Ever wished for a BASIC Windows Compiler? One with the straightforward
DOS text mode interface but megabytes and megabytes of memory? Ever
wished for a Windows compiler that's truly easy to use? Well,
now it's here. Today. The PowerBASIC Console Compiler for Windows. With
PB/CC, it's a whole new Windows! Text mode every version of Windows from Win95 to Vista and Win7.
This newest version of PB/CC sports a
number of exciting new features. Total support for both ANSI and Unicode strings with automatic conversion. Simplified resource support. You can add resource data inline, right in your basic source code. There is no need to create a resource file, compile it, and then link it into your source. All this done automatically. Dead code removal. Unreferenced code will be removed from the compiled program to minimize the executable file size. Create client COM applications using Dispatch, Direct, Automation, or Dual interfaces.
A complete graphics engine, a printer package for Windows-Only
printers,
dynamic pointers, and thread local storage, to name just a few. But
more
about them later.
PB/CC supports INPUT, PRINT, LOCATE,
LINE INPUT, INKEY$, INSTAT, CLS,
COLOR, KEY, KEY$, and LPRINT. All of the standard text functions. But
then
we added more. CONSHNDL, CURSOR, INSHIFT, PAGE, PAGEACTIVE,
PAGEVISIBLE,
SCREENATTR, PCOPY, WAITKEY$ and WAITSTAT. A complete set of mouse
handling
routines. SCROLL any region of the screen in any direction. STDIN,
STDOUT,
and STDERR. Even a PARSE statement and PARSE$ function to extract
delimited
fields, and new options for the EXTRACT$ function, too. All the text
tools you'll ever need.
What is a Console? The
Console is a text mode interface connected right to the heart of Windows. It looks and acts just like a text mode DOS program, but it's
actually a True Windows application! With a console application,
there's no fluff, no animated puppets, just intense computing power.
Port existing Basic code from DOS to Windows today! Access a flat
memory model that's practically unlimited. Boost performance with true
Windows code. Launch multiple concurrent threads. Use the CPU and
numeric coprocessor directly with Inline Assembler. Choose Register
Variables for your most critical code. With PB/CC, size and performance
are the prime factors.
Since the console device is a
text-only window, can a console compiler offer
graphics? Of course! Just open one or more graphic windows and you're
ready to go! You'll use GRAPHIC PRINT to draw plain text or fancy
text...
Any font. Any size. Any color. Bold. Underline. Italic and strikeout.
Mix any combination of fonts on any window. Print just about anything,
just
about anywhere, even on private bitmaps that aren't yet visible. You'll
copy
or stretch bitmaps. Shrink them or change them. Circles, ovals, lines
and
boxes. Fat lines, skinny lines, stylized lines. Arcs, circles, rounded
rectangles. Ellipses, pie sections, polygons, polylines. Even get or
set
pixels -- one by one. Filled forms or empty. Colors or not. The choices
are endless. You can mix new colors with those which exist, and measure
proportional text size before you print it. Then create a custom
scaling
system, even with fractional floating point coordinates! Of course,
once
you've built that work of art, you need to load and save it. So load
from
a resource, load and save a BMP on disk! Create a virtual graphic window that displays the contents of a larger virtual window. Scroll bars are added so the user can move the viewport to the desired section. There is even an option to allow the user to "drag" the edges of a graphic window to a new size.
And then there's printing. Access to
printers has always been something
of an issue, but not any more. We've added extended printing (XPRINT),
even for "Windows-Only" printers! Just like GRAPHIC for the screen,
XPRINT
offers it all on the printer. Print plain text or fancy text -- any
font,
any size, any color. Bitmaps and images, lines and boxes, circles and
polygons, virtually all the features of the GRAPHIC screen are there
for
printers, too! You can retrieve the size of the printer page, the
printable
area, the margins, even the number of points per inch. Select landscape
or
portrait mode, even the print quality setting. The PRINTER$() function
returns the name and port of every available printer. You can attach a
printer by its name, by default, or just display a printer dialog to
let the
user decide. It's all in there.
Another interesting point is that
graphics are extensible. Using the DC
(Device Context) from PowerBASIC, you can call the Windows API, your
own
custom code, even third-party code for special graphic functions. With
GRAPHIC GET/SET BITS, you can even manipulate the bitmap directly...
each pixel is stored in succession as a long integer color value.
So, can you get here from DOS? But of
course! PB/CC's high degree of
compatibility with PowerBASIC, QuickBasic, GW-BASIC and BASICA means
that
you can port existing DOS applications to Windows with ease. Stop
CHAINing
from module to module in DOS when you can create a single Windows
machine
code executable up to 2 gigabytes in size. And creating an array that
uses
50 megabytes of RAM is as simple as:
Dim x%(0 To 26214400)
So just how fast is PB/CC anyway?
We thought you'd never ask! This tiny example
may give you some idea of the power of PB/CC.
x## = 1
y## = 1.000001
t! = Timer
For i& = 1 To 100000000
x## = x## * y##
Next
t! = Timer - t!
What do we have here? 100,000,000
iterations of a simple floating point operation. On an AMD 64 CPU,
PowerBASIC 3.5 for DOS runs this loop in 1.977 seconds. Pretty
respectable, we think. PB3 has been benchmarked favorably against every
sort of compiler... C++, Pascal, QuickBasic, you name it. It's always
competitive.
So what about the PowerBASIC Console Compiler?
Same computer. Same operating system (WinXP Pro). Same source code,
line for line. No attempt to minimize any background tasks. Elapsed
time: 0.209 seconds. May we repeat that? Elapsed time: 0.209 seconds.
That's an instant gain of around 945%! Windows versions of PowerBASIC are
more than nine times faster than the best DOS Basic around!
So why the big difference? A number of
reasons...
Attention to detail. Attention to
results.
A philosophy that requires us to provide the very
best possible code generation. We simply don't believe that sloppy
coding can always be overcome by ever faster hardware. At some point,
every programmer (ours included!) must take on the obligation to write
quality code... and we take that obligation very seriously. That's
why our entire compiler, including all the library code to be linked,
occupies less than 300K! Compare that to multi-megabyte compilers
that seem more like dinosaurs! That's a simple example of the attention
we pay to careful programming.
"I recently bought the PowerBASIC Console Compiler for Windows. Great deal, and what a powerful package. I like it!" - Ron Schwartz, Pension Actuary, RKS Consultants, Inc.
Of course, performance is a factor of
technical
design issues, too. Like Register Variables.
Normally, every time a variable is altered,
assigned, or retrieved, memory must be accessed.
That's a relatively slow process, as compared
to accessing CPU and FPU registers. So PowerBASIC
stores 4 float variables and 2 integer variables
from each Sub/Function in a register instead
of memory. Simple concept, but very effective.
If those variables are referenced frequently,
the improvement can be dramatic. Moreover,
we let the programmer decide which variables
should be register variables... that way,
you can decide which will be most helpful.
And if you still decline to choose, PowerBASIC
will try to pick the best candidates for you,
from those at hand.
Just like PowerBASIC for DOS, our
console
compiler creates text mode applications. They
just run faster, deal with gigabytes of memory,
and offer access to the Windows API. And since
the source code is so similar to PB3 and QB45,
it's incredibly easy porting DOS code to Windows
today!
A complete Macro facility is provided. That's something seldom seen in a high level language. Essentially, a Macro invokes a text substitution engine which allows you to extend the PowerBASIC language in ways not seen before. PowerBASIC supports single line macros, multi-line macros, even function macros which return a result. And they don't occupy one byte of code space unless actually used. Each macro may take up to 240 arguments, so capacity shouldn't be an issue. MACROTEMP may even be used to specify identifiers which are made unique to each macro expansion, thus avoiding name conflicts. With PowerBASIC macros, you can design your own unique, personal language!
Mix Unicode and ANSI in the same program. Convert strings to and from OEM, Unicode, ANSI, and UTF-8. Display Unicode characters. Print Unicode characters. Read and write to Unicode files. Conversions from Unicode and ANSI are automatic. You can even select to have a complete Unicode emulation package in your executable to allow them to run properly on Windows 95, 98, and ME or select to have the runtime only use ANSI API routines.
PowerBASIC is entirely thread-safe, so multi-threaded
applications are a breeze. Isn't it
good to know your program can handle 2, 3, or
5000 tasks, all at the same time? You
can print a report, while still allowing data
entry. Watch for a hardware signal, while calculating
data services. All the power you need is packed
right into the PowerBASIC Thread Statement,
along with its simple extensions.
There is even a built-in THREAD object that offers a collection of methods which allow you to easily create and maintain additional threads of execution in your programs. Functions, Subroutines, Methods, and Properties can even be marked as THREADSAFE. When a procedure is declared THREADSAFE, PowerBASIC automatically establishes a semaphore which allows only one thread to execute it at a time. Others must wait until the first thread exits the THREADSAFE procedure before they are allowed to begin. This is important to protect global data (global, threaded, static, and instance variables) from corruption by interaction of the threads. PowerBASIC even offers
THREADED variables for "Thread Local Storage" -- each THREAD get its own
unique copy of the variable -- automatically.
Client COM services,and support for the Dispatch, Direct, Automation, and Dual Interfaces lets you tap the power of components. Invoke libraries and applications with ease, all controlled from your PowerBASIC client program. You'll find that the PowerBASIC object implementation is very efficient, with virtually no degradation of execution speed as compared to standard Subs and Functions. Invoke an instance of Microsoft Word, load and edit documents, all under the control of PowerBASIC? It's all there now, waiting for your command...
The PowerBASIC IDE has had some major improvements. Numerous improvements in the IDE have been made. The IDE is now based on tabs rather than MDI children. Up to 36 bookmarks are now supported. Improved undo handling. Quick context-sensitive syntax help is shown on the status bar. Find/Replace can now be set to wrap around the file. Project files have been enhanced to support a list of files, their scrolling position and caret position, a primary file, the active tab, breakpoints, bookmarks, and the debug Watch list. Backup files can now be created with a timestamp, numbered from 0 to 99, or even no backup file if you prefer. There's Print Preview and the new #PAGE metastatement for inserting a page break when printing from the IDE. Improved template files. The Open File dialog for source files now allows selecting multiple files at a time. And much more!
Extra debugging tools? PowerBASIC
shines with an array of built-in
functions. PROFILE gives an overview. A list of every sub and
function,
how many times each was called, and the total time spent executing each
of
them. CALLSTK captures all stack frames above you. It answers, "How did
I
get here?". TRACE generates an execution log of each sub, function,
label,
and TRACE PRINT, as they're executed in sequence. It gives you
parameter
values, return values, even error codes. TRACE answers "Where have I
been?",
and "How did I get here?". With these tools, debugging might now be fun!
You know, a quality compiler must
offer data types to suit the needs. And
PowerBASIC handles that with ease. Signed and unsigned integers to
64-bit.
Single, double, and extended precision float. Two forms of currency.
Dynamic strings, fixed strings, ASCIIZ strings. User-defined Types and
Unions. Guids. Variants, pointers, and more. Now, we've added BIT and
SIGNED BIT variables in TYPES and UNIONS. Each may be from 1 to 31 bits
wide, packed one after another. Perfect for bit coding, or translation
from C code. And FIELD variables? They work with the new FIELD
statement,
just like in DOS versions of BASIC. A FIELD is a string, mapped to a
specific section of a file buffer, or even another string. They're
allocated at run-time, so they can be changed as needed. Much like a
TYPE
that can be altered under program control. Best of all, a new internal
design makes them fast, fast, fast!
Pointers are great, but sometimes the
syntax is daunting, particularly
for very simple tasks. So we implemented Dynamic Pointers, using the
original PEEK/POKE as a model: xx# = PEEK(DOUBLE,addr&) This
retrieves
the double precision value stored at addr&, assigning it to xx#.
Very
straightforward and it works for all data types. And unlike the old
PEEK and POKE, it's just as fast as a pointer variable! Speaking of
simplification, LOCAL, STATIC, GLOBAL, and RESET can now use a list of
variables, like: STATIC abc, bcd, xyz AS STRING And, ARRAY ASSIGN lets
you assign values to every element of an array in a single statement!
Tired of the hassle of "drag and drop
form
designers"? Lost in a sea of API calls just
to display text and numbers in a window? With
PB/CC, it's a whole new Windows! Compile
Basic code to sizzling text mode programs.
For Windows 95, 98, Me, NT, 2000, or even
WinXP. Put your programming effort where it
belongs -- at the core of your code. And when
your calculations are complete, it's a simple
matter to PRINT, or even LPRINT, the results!
Did you say Internet? Create CGI
apps
for your web server! It's the perfect tool.
PB/CC offers Standard Input & Output for
easy communication. Get standalone executables
as small as 10K. All with no run-time requirements
of any kind. Whether your program looks up
names, or simply calculates a mortgage, it
can take data from a web form, process as
needed, then deliver the results right to
the browser of a distant end user.
You know, a typical shopping cart
program
written in Visual Basic needs some 5 Megabytes
of RAM. So, using VB, you may find you're
limited to around 20 simultaneous connections.
But use PB/CC instead, and memory needs plummet!
To around 100K total! That means 1000 simultaneous
connections on that very same Web Server!
Built-in support for TCP and UDP
means
that your application can now communicate
with far-away servers on the Internet or local
servers on your Intranet. Send email messages
with SMTP. Download web pages using HTTP.
Even create your own TCP or UDP server for
communication with other applications.
High-speed Serial Communications
means
you can can access modems or other serial
devices without struggling with obscure API
calls. Dial into remote computers that aren't
connected to the internet with just a few
lines of code.
New Features in PB/CC Version 6
#EXPORT metastatement declare a Sub/Function to have the EXPORT attribute.
#LINK metastatement links a pre-compiled Static Link Library (SLL) into your host program.
#OPTIMIZE CODE ON metastatement removes unreferenced code from the compiled program.
#OPTIMIZE CODE OFF metastatement keeps unreferenced code in the compiled program.
#OPTION LARGEMEM32 metastatement allows your application to use more than the original limit of 2 Gigabytes of memory.
#OPTION WIN95 metastatement includes a complete Unicode emulation package in your EXE to allow them to run properly on Windows 95, 98, and ME.
#OPTION ANSIAPI metastatement directs the internal runtime library to only use ANSI Windows API calls.
#PAGE metastatement sets a page boundary for the PowerBASIC IDE.
#RESOURCE BITMAP metastatement embeds a bitmap as Resource data into your program.
#RESOURCE ICON metastatement embeds a icon as Resource data into your program.
#RESOURCE MANIFEST metastatement embeds a manifest file into your program.
#RESOURCE RCDATA metastatement embeds raw resource data into your program.
#RESOURCE STRING metastatement embeds a as Resource data into your program.
#RESOURCE PBR metastatement embeds a PowerBASIC compiled resource (.PBR) into your program.
#RESOURCE RES metastatement embeds a compiled resource (.RES) file into your program.
#RESOURCE VERSIONINFO metastatement embeds version information into your program.
#RESOURCE WAVE metastatement embeds a wave file into your program.
#UNIQUE metastatement specifies whether unique variable names are required.
ASM ALIGN statement rounds up the instruction location to a power of two address.
ASMDATA/END ASMDATA statements defines a block where primitive read-only data is stored.
BITS$ function copies string contents without modification.
CHRBYTES function determines the size of a single character in a string variable.
CHR$$ function converts one or more numeric Unicode character codes, code ranges, and/or strings into a single string.
CHRTOOEM$ function translates a string of ANSI/WIDE characters to OEM byte characters.
ChrToUtf8$ function translates a string of ANSI/WIDE characters to UTF-8 byte characters.
CLIP$ function deletes characters from a string.
COLLECTION Object Group provides a convenient way to refer to a related group of items as a single object.
COMM TIMEOUT statement places a limit on the time to complete a operation.
CON.CAPTION$ property retrieves the text which is currently displayed as the caption of the CONSOLE window.
CON.CAPTION$ property changes the text which is currently displayed as the caption of the CONSOLE window.
CON.CELL property retrieves the cursor (caret) position for the Console Window.
CON.CELL property sets the cursor (caret) position on the Console Window.
CON.CELL.COL method retrieves the cursor (caret) column position for the Console Window.
CON.CELL.ROW method retrieves the cursor (caret) row position for the Console Window.
CON_CLS method clears the active console page to the current background color.
CON_COLOR method sets the foreground and background colors which will be used to display text on the Console Window.
CON.CURSOR property retrieves the size of the cursor (caret).
CON.CURSOR property establishes the size of the cursor (caret).
CON.CURSOR.OFF method makes the cursor invisible.
CON.CURSOR.ON method makes the cursor visible.
CON.END method releases and detaches the Console Window currently attached to your program.
CON.FOCUS method brings the Console Window to the foreground and directs the focus to it.
CON.GETSTDERR method retrieves the handle of the standard error device.
CON.GETSTDIN method retrieves the handle of the standard input device.
CON.GETSTDKBD method retrieves the handle of the standard keyboard device.
CON.GETSTDOUT method retrieves the handle of the standard output device.
CON.GETSTDVID method retrieves the handle of the standard console specified video page.
CON.HANDLE method retrieves the handle of the Console Window.
CON.IN method determines whether Standard Input is being redirected.
CON.INKEY$ method reads a keyboard character or mouse event from the console input buffer.
CON.INPUT method reads a line from the keyboard.
CON.INPUT.FLUSH method removes all pending keyboard and mouse events from the console input buffer.
CON.INSHIFT method returns a numeric value to tell you the state of the keyboard Shift, Ctrl and Alt keys.
CON.INSTAT method determines whether a keyboard or mouse event is ready to be retrieved from the console input buffer.
CON.KEY method assigns a string expression to a function key.
CON.KEY$ method retrieves and returns the string expression assigned to a function key.
CON.LINE.INPUT method reads an entire line from the keyboard into a string variable.
CON.LOC property retrieves the location of the console window on the screen.
CON.LOC property moves the Console Window to a new location on the screen.
CON.LOC.X method retrieves the horizontal location of the console window on the screen.
CON.LOC.Y method retrieves the vertical location of the console window on the screen.
CON.LOCATE property retrieves the cursor (caret) position for the Console Window.
CON.LOCATE property sets the cursor (caret) position on the Console Window.
CON.LOCATE.COL method retrieves the cursor (caret) column position for the Console Window.
CON.LOCATE.ROW method retrieves the cursor (caret) row position for the Console Window.
CON.MOUSE method defines which console mouse events and buttons should be trapped.
CON.MOUSE.BUTTONS method returns the number of buttons on the system mouse.
CON.MOUSE.COL method returns the column position of the mouse cursor.
CON.MOUSE.OFF method disables mouse event trapping and the mouse cursor.
CON.MOUSE.ON method enables mouse event trapping and the mouse cursor.
CON.MOUSE.ROW method returns the row position of the mouse cursor.
CON.MOUSE.STAT method determines whether a mouse event is ready to be retrieved from the console input buffer.
CON.NEW method creates a new Console Window and attaches it to your program.
CON.OUT method determines whether Standard Output is being redirected.
CON.PAGE.ACTIVE property retrieves the page number of the active console page.
CON.PAGE.ACTIVE property sets the page number of the active console page.
CON.PAGE.VISIBLE property retrieves the page number of the visible console page.
CON.PAGE.VISIBLE property sets the page number of the visible console page.
CON.PCOPY method copies all text from one console text page to another.
CON.PRINT method writes text data to the current console text page.
CON.SCREEN property retrieves the size of the visible part of the Console Window.
CON.SCREEN property changes the size of the visible Console Window.
CON.SCREEN.ATTR method returns the attribute (color) of a character on the current console page (screen).
CON.SCREEN.CHAR method returns the ASCII code of a character on the current console page (screen).
CON.SCREEN.COL method retrieves the size of the visible part of the Console Window in columns.
CON.SCREEN.ROW method retrieves the size of the visible part of the Console Window in rows.
CON.SCROLL.DOWN method scrolls all or part of the current console page up.
CON.SCROLL.LEFT method scrolls all or part of the current console page to the left.
CON.SCROLL.RIGHT method scrolls all or part of the current console page to the right.
CON.SCROLL.UP method scrolls all or part of the current console page down.
CON.SIZE method retrieves the size of the Console Window.
CON.SIZE.X method retrieves the horizontal size of the Console Window.
CON.SIZE.Y method retrieves the vertical size of the Console Window.
CON.STDEOF method determines whether the end of STANDARD INPUT has been reached.
CON.STDERR method outputs a string expression to the standard error device.
CON.STDIN.LINE method reads one line of text from the Standard Input Device.
CON.STDOUT method outputs a string expression to the standard output device.
CON.VIEW property retrieves the position of the viewable part of a virtual screen.
CON.VIEW property sets the position of the viewable part of a virtual screen.
CON.VIEW.COL method retrieves the column position of the viewable part of a virtual screen.
CON.VIEW.ROW method retrieves the row position of the viewable part of a virtual screen.
CON.VIRTUAL property retrieves the size of the screen buffers associated with the console window.
CON.VIRTUAL property changes the size of the screen buffer associated with the console window.
CON.VIRTUAL.COL method retrieves the column size of the screen buffers associated with the console window.
CON.VIRTUAL.ROW method retrieves the row size of the screen buffers associated with the console window.
CON.WAITKEY$ method reads a character, extended key, or mouse event from the console.
CON.WAITSTAT function waits until a key is pressed or a mouse event occurs.
DAYNAME$ function converts a Day-of-Week number to the associated name.
DEC$ function converts an integral value to a decimal string.
ENUM/END ENUM statements creates a group of logically related numeric equates.
EXE.INST read-only user defined type returns the instance handle of the program which is currently executing.
FASTPROC/END FASTPROC statements defines a FastProc code section.
FOR EACH/NEXT statements defines a loop of program statements which can sequentially examine and act upon each member of a PowerCollection or LinkListCollection.
GET$$ statement reads WIDE string data from a file opened in binary mode.
GRAPHIC(CANVAS.X) function retrieves the writable width of the attached graphic target.
GRAPHIC(CANVAS.Y) function retrieves the writable height of the attached graphic target.
GRAPHIC(Cell.Size.X) function retrieves the character cell width including external leading.
GRAPHIC(Cell.Size.Y) function retrieves the character cell height including external leading.
GRAPHIC(Chr.Size.X) function retrieves the character width on the graphic target.
GRAPHIC(Chr.Size.Y) function retrieves the character height on the graphic target.
GRAPHIC(Client.X) function retrieves the client width of the attached graphic target.
GRAPHIC(Client.Y) function retrieves the client height of the attached graphic target.
GRAPHIC(Clip.X) function retrieves the width of the clip area.
GRAPHIC(Clip.Y) function retrieves the height of the clip area.
GRAPHIC(COL) function retrieves the next column print position, based upon the row and column position of a text cell.
GRAPHIC(DC) function retrieves the handle of the DC (device context) for the selected graphic target.
GRAPHIC(INSTAT) function determines whether a keyboard character is ready.
GRAPHIC(LINES) function retrieves the number of text lines which will fit on the graphic target.
GRAPHIC(LOC.X) function retrieves the horizontal location of the graphic target on the desktop.
GRAPHIC(LOC.Y) function retrieves the vertical location of the graphic target on the desktop.
GRAPHIC(MIX) function retrieves the color mix mode for the selected graphic target.
GRAPHIC(OVERLAP) function retrieves the status of Graphic Overlap Mode.
GRAPHIC(PIXEL...) function retrieves the color of the pixel at the specified point.
GRAPHIC(POS.X) function retrieves the horizontal POS (last point referenced) by a GRAPHIC statement.
GRAPHIC(POS.Y) function retrieves the vertical POS (last point referenced) by a GRAPHIC statement.
GRAPHIC(PPI.X) function retrieves the horizontal resolution of the display device, in points per inch.
GRAPHIC(PPI.Y) function retrieves the vertical resolution of the display device, in points per inch.
GRAPHIC(ROW) function retrieves the next row print position, based upon the row and column position of a text cell.
GRAPHIC(SCROLLTEXT) function retrieves the status of Graphic ScrollText Mode.
GRAPHIC(SIZE.X) function retrieves the overall width of the selected graphic target.
GRAPHIC(SIZE.Y) function retrieves the overall height of the selected graphic target.
GRAPHIC(STRETCHMODE) function retrieves the default bitmap stretching mode for the attached DC.
GRAPHIC(TEXT.SIZE.X...) function calculates the width of text to be printed.
GRAPHIC(TEXT.SIZE.Y...) function calculates the height of text to be printed.
GRAPHIC(View.X) function retrieves the horizontal position of the virtual graphic viewport.
GRAPHIC(View.Y) function retrieves the vertical position of the virtual graphic viewport.
GRAPHIC(WORDWRAP) function retrieves the status of Graphic WordWrap Mode.
GRAPHIC(WRAP) function retrieves the status of Graphic Wrap Mode.
GRAPHIC$(CAPTION) function retrieves the caption from a Graphic Window.
GRAPHIC$(INKEY$) function reads a keyboard character if one is ready.
GRAPHIC$(WAITKEY$) function reads a keyboard character or extended key, waiting until one is ready.
GRAPHIC$ (WAITKEY$...) function reads a limited set of keyboard characters or extended keys, with an optional timeout value.
GRAPHIC CELL SIZE statement retrieves the character cell size including external leading.
GRAPHIC CELL statement sets or retrieves the next print position, based upon the row and column position of a text cell.
GRAPHIC COL statement retrieves the next column print position, based upon the row and column position of a text cell.
GRAPHIC GET CANVAS statement retrieves the buffer size of the attached graphic target.
GRAPHIC GET CAPTION statement retrieves the caption from a Graphic Window.
GRAPHIC GET CLIP statement retrieves the size of the clip area.
GRAPHIC GET OVERLAP statement retrieves the status of Graphic Overlap Mode.
GRAPHIC GET SCROLLTEXT statement retrieves the status of Graphic ScrollText Mode.
GRAPHIC GET SIZE statement retrieves the overall size of the selected graphic target.
GRAPHIC GET STRETCHMODE statement retrieves the default bitmap stretching mode for the attached DC.
GRAPHIC GET VIEW statement retrieves the position of the virtual graphic viewport.
GRAPHIC GET WORDWRAP statement retrieves the status of Graphic WordWrap Mode.
GRAPHIC GET WRAP statement retrieves the status of Graphic Wrap Mode.
GRAPHIC ROW statement retrieves the next row print position, based upon the row and column position of a text cell.
GRAPHIC SET AUTOSIZE statement expands a graphic target into autosize mode.
GRAPHIC SET CAPTION statement changes the caption on a Graphic Window.
GRAPHIC SET CLIENT statement changes the size of a graphic window to a specific client area size.
GRAPHIC SET CLIP statement establishes margins around the outer edges of the graphic target.
GRAPHIC SET FIXED statement restores a graphic target to standard fixed mode.
GRAPHIC SET OVERLAP statement enables or disables Graphic Overlap Mode.
GRAPHIC SET SCROLLTEXT statement enables or disables Graphic ScrollText Mode.
GRAPHIC SET SIZE statement changes the overall size of a graphic window.
GRAPHIC SET STRETCHMODE statement sets the default bitmap stretching mode for the current DC.
GRAPHIC SET VIEW statement changes the position of the viewport on a virtual graphic target.
GRAPHIC SET VIRTUAL statement expands a graphic target into virtual mode.
GRAPHIC SET WORDWRAP statement enables or disables Graphic WordWrap Mode.
GRAPHIC SET WRAP statement enables or disables Graphic Wrap Mode.
GRAPHIC SPLIT statement splits a string into two parts for display on a graphic target.
GRAPHIC STRETCH PAGE statement copies and resizes a bitmap to the clip or client area of the selected graphic target.
GRAPHIC WINDOW HIDE statement makes a graphic window invisible.
GRAPHIC WINDOW MINIMIZE statement minimizes a graphic window.
GRAPHIC WINDOW NONSTABLE statement makes a graphic window non-stable (closeable).
GRAPHIC WINDOW NORMALIZE statement makes a graphic window visible.
GRAPHIC WINDOW STABILIZE statement makes a graphic window stable (non-closeable).
GRAPHIC WINDOW TEXT statement creates a new standalone window oriented more towards the display of text.
IMPORT ADDR statement loads a library (DLL) to access an imported procedure.
IMPORT CLOSE statement frees a library.
ILinkListCollection.ADD method adds am item to the end of the LinkListCollection.
ILinkListCollection.CLEAR method removes all items from the LinkListCollection.
ILinkListCollection.COUNT method returns the number of items currently in the LinkListCollection.
ILinkListCollection.FIRST method sets the current index for the LinkListCollection to one (1) and returns the previous value.
ILinkListCollection.INDEX method sets the current index for the LinkListCollection to the specified value and returns the previous value.
ILinkListCollection.INSERT method adds the specified item to the specified index position..
ILinkListCollection.ITEM method returns the item from the specified index position.
ILinkListCollection.LAST method sets the index value to the last item and returns the previous value.
ILinkListCollection.NEXT method returns the next item in the LinkListCollection.
ILinkListCollection.PREVIOUS method returns the previous item in the LinkListCollection.
ILinkListCollection.REMOVE method removes the item at the specified position from the LinkListCollection.
ILinkListCollection.REPLACE method replaces the item at the specified position with a new item in the LinkListCollection.
IPowerArray.ARRAYBASE method returns the address of the first element of the array.
IPowerArray.ARRAYDESC method returns the address of the SAFEARRAY descriptor.
IPowerArray.ARRAYINFO property retrieves the info string, if one is present.
IPowerArray.ARRAYINFO property assigns the info string to the array.
IPowerArray.CLONE method copies an exact duplicate of the SafeArray, and stores it in the specified PowerArray object.
IPowerArray.COPYFROMVARIANT method copies an exact duplicate of the specified SafeArray and stores it in this PowerArray object.
IPowerArray.COPYTOVARIANT method copies an exact duplicate of the SafeArray in this object and stores it in the specified Variant.
IPowerArray.DIM method dimensions (creates) a new array.
IPowerArray.ELEMENTPTR method retrieves the address of the specified data element.
IPowerArray.ELEMENTSIZE method retrieves the storage size (in bytes) of each data element of the array.
IPowerArray.ERASE method destroys the contained array and empties the object.
IPowerArray.LBOUND method retrieves the lower bound number for the dimension specified.
IPowerArray.LOCK method increments the lock count of the SAFEARRAY.
IPowerArray.MOVEFROMVARIANT method transfers ownership of the specified SafeArray contained in the variant to the PowerArray object.
IPowerArray.MOVETOVARIANT method transfers ownership of the SafeArray contained in this PowerArray object to a variant parameter.
IPowerArray.REDIM method allows the SafeArray to be erased and re-dimensioned to a new size.
IPowerArray.REDIMPRESERVE method allows the least significant (rightmost) bound to be changed to a new size. The remaining data items in the array are preserved.
IPowerArray.RESET method sets all elements in the SafeArray back to their initial, default value.
IPowerArray.SUBSCRIPTS method retrieves the number of dimensions (subscripts) for this array.
IPowerArray.UBOUND method retrieves the upper bound number for the dimension specified.
IPowerArray.UNLOCK method decrements the lock count of the SAFEARRAY.
IPowerArray.VALUEGET method retrieves the value of the specified array element.
IPowerAraay.VALUESET method assigns the value to the specified array element.
IPowerArray.VALUETYPE method retrieves the %VT code which describes the data contained in this array.
IPowerCollection.ADD method adds an item and key to the end of the PowerCollection.
IPowerCollection.CLEAR method removes all items and keys from the PowerCollection.
IPowerCollection.CONTAINS method scans the PowerCollection for the specified key.
IPowerCollection.COUNT method returns the number of data items currently contained in the PowerCollection.
IPowerCollection.ENTRY method returns the PowerCollection item specified by the Index number.
IPowerCollection.FIRST method sets the index to the first item and returns the previous value.
IPowerCollection.INDEX method sets the index value and returns the previous value.
IPowerCollection.ITEM method returns the item associated with the specified key in the PowerCollection.
IPowerCollection.LAST method sets the index to the last item and returns the previous value.
IPowerCollection.NEXT method returns the next item in the PowerCollection.
IPowerCollection.PREVIOUS method returns the previous item in the PowerCollection.
IPowerCollection.REMOVE method removes the item associated with the specified key from the PowerCollection.
IPowerCollection.REPLACE method replaces the item associated with the specified key with a new item.
IPowerCollection.SORT method sorts the data items in the PowerCollection based upon the text in the associated keys.
IPowerThread.Close method releases the handle of this thread.
IPowerThread.Equals method compares the specified object to determine if it references the same object as this object.
IPowerThread.Handle method retrieves the handle of the thread for use with Windows API functions.
IPowerThread.Id method retrieves the ID of the thread for use with Windows API functions.
IPowerThread.IsAlive method checks the thread to see if it is currently "alive".
IPowerThread.Join method waits for the specified thread object to complete before execution of this thread continues.
IPowerThreadLaunch method begins execution of the thread object.
IPowerThread.Priority property get retrieves the priority value for this thread.
IPowerThread.Priority property set sets the priority value for this thread.
IPowerThread.Result method retrieves the results value if the thread has ended.
IPowerThread.Resume method resumes execution of a suspended thread.
IPowerThread.StackSize property get retrieves the size of the stack for this thread.
IPowerThread.StackSize property set sets the size of the stack for this thread to the value specified.
IPowerThread.Suspend method suspends execution of the thread.
IPowerThread.TimeCreate method retrieves the date and time-of-day of the thread creation.
IPowerThread.TimeExit method retrieves the date and time-of-day of the thread exit
IPowerThread.TimeKernel method retrieves the amount of time this thread has spent in kernel mode.
IPowerThread.TimeUser method retrieves the amount of time this thread has spent in user mode.
IPowerTime.AddDays method adds or subtracts a specified number of days to value of this object.
IPowerTime.AddHours method adds or subtracts a specified number of hours to value of this object.
IPowerTime.AddMinutes method adds or subtracts a specified number of minutes to value of this object.
IPowerTime.AddMonths method adds or subtracts a specified number of months to value of this object.
IPowerTime.AddMSeconds method adds or subtracts a specified number of milliseconds to value of this object.
IPowerTime.AddSeconds method adds or subtracts a specified number of seconds to value of this object.
IPowerTime.AddTicks method adds or subtracts a specified number of ticks to value of this object.
IPowerTime.AddYears method adds or subtracts a specified number of years to value of this object.
IPowerTime.DateDiff method compares the date component of an external PowerTime object to this objects date component.
IPowerTime.DateString method returns the Date component of the object expressed as a string.
IPowerTime.DateStringLong method returns the Date component of the PowerTime object, expressed as a string, with a full alphabetic month name.
IPowerTime.Day method returns the Day component of the object.
IPowerTime.DayOfWeek method returns the Day-of-Week component of the object.
IPowerTime.DayOfWeekString method returns the Day-of-Week of the object, expressed as a string (Sunday, Monday...).
IPowerTime.DaysInMonth method returns the number of days which comprise the month of the date of the PowerTime object.
IPowerTime.FileTime property get returns a Quad-Integer value of the PowerTime object as a FileTime.
IPowerTime.FileTime property set the FileTime Quad-Integer value specified is assigned as the PowerTime object value
IPowerTime.Hour method returns the Hour component of the object.
IPowerTime.IsLeapYear method returns true/false (-1/0) to tell if the object year is a leap year.
IPowerTime.Minute method returns the Minute component of the object.
IPowerTime.Month method returns the Month component of the object.
IPowerTime.MonthString method returns the Month component of the object, expressed as a string (January, February...).
IPowerTime.MSecond method returns the millisecond component of the PowerTime object.
IPowerTime.NewDate method assigns a new value to the date component of the PowerTime object.
IPowerTime.NewTime method assigns a new value to the time component of the PowerTime object.
IPowerTime.Now method assigns the current local date and time on this computer to this object.
IPowerTime.NowUTC method assigns the current Coordinated Universal date and time (UTC) to this object.
IPowerTime.Second method returns the Second component of the object.
IPowerTime.Tick method returns the Tick component of the object.
IPowerTime.TimeDiff method compares the time component of an external PowerTime object with this objects time component.
IPowerTime.TimeString method returns the Time component of the PowerTime object expressed as a string.
IPowerTime.TimeString24 method returns the Time component of the PowerTime object expressed as a string. The time is formated as hh:mm in 24-hour notation.
IPowerTime.TimeStringFull method returns the Time component of the PowerTime object expressed as a string. The time is formated as hh:mm:ss.tt in 24-hour notation.
IPowerTime.Today method the current local date on this computer is assigned to this PowerTime object.
IPowerTime.ToLocalTime method converts the object to local time.
IPowerTime.ToUTC method converts the object to Coordinated Universal Time (UTC).
IPowerTime.Year method returns the Year component of the PowerTime object as a numeric value.
IQueueCollection.CLEAR method removes all items from the QueueCollection.
IQueueCollection.COUNT method returns the number of data items currently contained in the QueueCollection.
IQueueCollection.DEQUEUE method returns the item at the "oldest" position in the QueueCollection.
IQueueCollection.ENQUEUE method adds the specified item to the "newest" position in the QueueCollection.
IStackCollection.CLEAR method removes all items from the StackCollection.
IStackCollection.COUNT method returns the number of data items currently contained in the StackCollection.
IStackCollection.POP method returns the item at the "Stack-Top" (the item most recently added).
IStackCollection.PUSH method adds the specified item to the StackCollection at the "Stack-Top" position.
IStringBuilderA.Add method appends an ANSI string to the object.
IStringBuilderA.Capacity property get retrieves the size of the internal buffer.
IStringBuilderA.Capacity property set sets the size of the internal buffer.
IStringBuilderA.Char property get returns the numeric character code of the character at the specified position.
IStringBuilderA.Char property set changes the numeric character code of the character at the specified position.
IStringBuilderA.Clear method erases all data in the object.
IStringBuilderA.Delete method deletes all data in the object.
IStringBuilderA.Insert method inserts a string at a specified position.
IStringBuilderA.Len method returns the number of characters stored in the object.
IStringBuilderA.String method returns the ANSI string stored in the object.
IStringBuilderW.Add method appends an WIDE string to the object.
IStringBuilderW.Capacity property get retrieves the size of the internal buffer.
IStringBuilderW.Capacity property set sets the size of the internal buffer.
IStringBuilderW.Char property get returns the numeric character code of the character at the specified position.
IStringBuilderW.Char property set changes the numeric character code of the character at the specified position.
IStringBuilderW.Clear method erases all data in the object.
IStringBuilderW.Delete method deletes all data in the object.
IStringBuilderW.Insert method inserts a string at a specified position.
IStringBuilderW.Len method returns the number of characters stored in the object.
IStringBuilderW.String method returns the WIDE string stored in the object.
ISNOTNULL function determines if a string is not nul (contains 1 or more characters).
ISNULL function determines if a string is nul (zero-length).
MEMORY COPY statement copies a specified number of bytes from one address to another.
MEMORY FILL statement fills a specified address with a specified number of bytes with one or more copies of a specified string expression.
MEMORY SWAP statement exchanges a specified number of bytes from at one address with the data at another address.
METRICS function retrieves information or dimensions of system elements.
MONTHNAME$ function converts a Month number to the associated name.
OBJEQUAL function checks if object variables refer to the same object.
OemToChr$ function translates a byte string of OEM characters into ANSI/WIDE characters.
PLAY statement plays a wave file under program control.
POKE$$ statement stores the characters of a string expression as consecutive 2-byte words of memory at a specific address.
PEEK$$ function retrieves a specified count of consecutive 2-byte wide characters, and returns them as a wide character string.
PowerArray object encapsulates the Windows SAFEARRAY structure.
PowerTime object contains a date and time value, allowing easy calculations.
PREFIX/END PREFIX statements execute a series of statements, each of which utilizes pre-defined source code.
PUT$$ statement writes a WIDE Unicode string to a file opened in binary mode.
RESOURCE$ function returns predefined resource data.
RESUME FLUSH statement flushes the RESUME stack and program execution simply continues on the line immediately following the RESUME FLUSH.
RETURN FLUSH statement removes the most recent return address from the system stack and program flow continues normally after the RETURN FLUSH.
SHRINK$ function shrinks a string to use a consistent single character delimiter.
SPLIT statement splits a string into two parts.
STRINGBUILDER Object offers the ability to concatenate many string sections at a very high level of performance.
STRING$$ function returns a Unicode string consisting of multiple copies of a specified character.
THREAD Object offers a collection of methods which allow you to easily create and maintain additional threads of execution in your programs.
TXT.CELL method sets or retrieves the cursor position.
TXT.CLS method clears the Text Window and moves to caret to the upper left corner.
TXT.COLOR method sets the foreground color.
TXT.END method destroys and detaches the Text Window currently attached to your program from the process.
TXT.INKEY$ method reads a keyboard character if one is ready.
TXT.INSTAT method determines whether a keyboard character is ready.
TXT.LINE.INPUT method reads an entire line from the keyboard.
TXT.PRINT method writes text data to the TEXT WINDOW at the current caret location.
TXT.WAITKEY$ method reads a keyboard character, waiting until one is ready.
TXT.WINDOW method creates a new Text Window and attaches it to your program.
UNWRAP$ removes paired characters from the beginning and end of a string.
Utf8ToChr$ function translates a byte string of OEM characters into ANSI/WIDE characters.
VAL statement converts a text string to a numeric value with additional information.
VARIANT$$ function returns the Unicode string value contained in a Variant variable.
WRAP$ function adds paired characters to the beginning and end of a string.
XPRINT(CANVAS.X) function retrieves the writable width of the host printer page.
XPRINT(CANVAS.Y) function retrieves the writable height of the host printer page.
XPRINT(Cell.Size.X) function retrieves the character cell width including external leading.
XPRINT(Cell.Size.Y) function retrieves the character cell height including external leading.
XPRINT(Chr.Size.X) function retrieves the character width on the host printer page.
XPRINT(Chr.Size.Y) function retrieves the character height on the host printer page.
XPRINT(Client.X) function retrieves the width of the client area (printable area) on the host printer page.
XPRINT(Client.Y) function retrieves the height of the client area (printable area) on the host printer page.
XPRINT(Clip.X) function retrieves the width of the clip area on the selected printer.
XPRINT(Clip.Y) function retrieves the height of the clip area on the selected printer.
XPRINT(COL) function retrieves the next column print position, based upon the row and column position of a text cell.
XPRINT(COLLATE) function retrieves the XPRINT collate status.
XPRINT(COLORMODE) function retrieves the XPRINT colormode status.
XPRINT(COPIES) function retrieves the XPRINT copy count.
XPRINT(DC) function retrieves the handle of the device context (DC) for the host printer page.
XPRINT(DUPLEX) function retrieves the XPRINT duplex status.
XPRINT(LINES) function retrieves the number of lines that can be printed.
XPRINT(MIX) function retrieves the color mix mode for a host printer page.
XPRINT(ORIENTATION) function retrieves the paper orientation for a host printer page.
XPRINT(OVERLAP) function retrieves the status of XPrint Overlap Mode.
XPRINT(PAPER) function retrieves the current paper size/type.
XPRINT(PIXEL...) function retrieves the color of a pixel on a host printer page.
XPRINT(POS.X) function retrieves the last horizontal point referenced (POS) by an XPRINT statement.
XPRINT(POS.Y) function retrieves the last vertical point referenced (POS) by an XPRINT statement.
XPRINT(PPI.X) function retrieves the horizontal resolution of the host printer page.
XPRINT(PPI.Y) function retrieves the vertical resolution of the host printer page.
XPRINT(ROW) function retrieves the next row print position, based upon the row and column position of a text cell.
XPRINT(QUALITY) function retrieves the print quality setting for the host printer.
XPRINT(SELECTION) function retrieves the status of the SELECTION flag.
XPRINT(SIZE.X) function retrieves the width of the host printer page.
XPRINT(SIZE.Y) function retrieves the height of the host printer page.
XPRINT(STRETCHMODE) function retrieves the default bitmap stretching mode for the attached DC.
XPRINT(TEXT.SIZE.X...) function calculates the width of text to be printed on a host printer.
XPRINT(TEXT.SIZE.Y...) function calculates the height of text to be printed on a host printer.
XPRINT(TRAY) function retrieves the active printer tray.
XPRINT(WORDWRAP) function retrieves the status of XPRINT WordWrap Mode.
XPRINT(WRAP) function retrieves the status of XPRINT Wrap Mode.
XPRINT$(ATTACH) function returns the name of the attached host printer.
XPRINT$(PAPERS) function retrieves a list of supported paper types.
XPRINT$(TRAYS) function retrieves a list of supported paper trays.
XPRINT CELL SIZE statement retrieves the character cell size including external leading.
XPRINT CELL statement sets or retrieves the next print position, based upon the row and column position of a text cell.
XPRINT GET ATTACH statement retrieves the name of the attached host printer.
XPRINT GET CANVAS statement retrieves the buffer size of the attached host printer.
XPRINT GET CLIP statement retrieves the size of the clip area on the selected printer.
XPRINT GET OVERLAP statement retrieves the status of XPrint Overlap Mode.
XPRINT GET PAGES statement retrieves the XPRINT page number limits for this print job.
XPRINT GET SELECTION statement retrieves the status of the SELECTION flag.
XPRINT GET STRETCHMODE statement retrieves the default bitmap stretching mode for the attached DC.
XPRINT GET WORDWRAP statement retrieves the status of XPRINT WordWrap Mode.
XPRINT GET WRAP statement retrieves the status of XPRINT Wrap Mode.
XPRINT PREVIEW statement display a replica of a printed document on the screen.
XPRINT PREVIEW CLOSE statement reverts XPRINT output back to the host printer.
XPRINT SET CLIP statement establishes margins around the outer edges of the print page.
XPRINT SET OVERLAP statement enables or disables XPRINT Overlap Mode.
XPRINT SET PAGES statement sets the XPRINT page number limits for this print job.
XPRINT SET STRETCHMODE statement sets the default bitmap stretching mode for the current DC.
XPRINT SET WORDWRAP statement enables or disables XPRINT WordWrap Mode.
XPRINT SET WRAP statement enables or disables XPrint Wrap Mode.
XPRINT SPLIT statement splits a string into two parts for printing with XPRINT.
XPRINT STRETCH PAGE statement copies and resizes a bitmap to the clip or client area of the print page.
Special features of PowerBASIC
Console
Compiler
#STACK sets the program stack size
ACODE$() translates unicode strings
to ansi
ARRAY SORT, SCAN, INSERT, DELETE
ARRAYATTR() returns status, data
type, subscripts, etc.
ASCIIZ strings supported for
Windows compatibility
Assembler is built-in for opcodes
through Pentium class
BIN$() allows optional leading
zeros to a fixed field size
BIT CALC set/reset a bit based upon
a dynamic calculation
BIT SHIFT, ROTATE, TEST, SET, RESET
and TOGGLE
BITS() function for bit pattern
conversion between signed/unsigned
CALLSTK captures the entire stack
frame
CHOOSE(index&, choice1,
choice2...) chooses one of several values
CHR$() function may take multiple
or a range of parameters
Client/Server Network
communications using TCP and UDP
CLSID$(program_id$) returns the
associated CLSID
Code pointer variables particularly
suitable for callbacks
Compile to true machine code for
maximum performance
PB/CC 6 is priced at $169. Registered
owners of PB/CC 5 can upgrade
to PB/CC 6 for $89, while upgrades from prior versions are $119.
Delivery costs are additional.