On 04-29-96, Steven Anderson wrote to All:
SA> So, why is 3.2 better than 3.0a... :)
SA> I have 3.0a and Am thinking of buying 3.2
What's New in PowerBASIC 3.2
============================
þ Data pointers. A pointer is a variable which holds a 32-bit address to any
type of data which exists anywhere in memory. See the "Pointers" section of
the "Data Types" topic in the PowerBASIC help file and Chapter 5 of the
User's Guide for a complete explanation and examples.
þ Code pointers. A code pointer is a DWORD variable or pointer with the
address of a label or SUB. Using the new "CALL DWORD x", "GOTO DWORD x", and
"GOSUB DWORD x" keywords. See the help file for more information.
þ To facilitate the use of pointers, 32-bit variations of CODEPTR, STRPTR,
and VARPTR have been added.
CODEPTR32 will return a full 32-bit DWORD pointer to any label, SUB, or
FUNCTION in your program.
VARPTR32 will return a full 32-bit DWORD pointer to any variable in your
program. When used with a string, it returns a 32-bit pointer to the handle
of the string. When used with a fixed length string, it returns a 32-bit
pointer to the data contained in the string. When used with an array
identifier with no elements (MyArray()) it returns a 32-bit pointer to the
array descriptor.
STRPTR32 will return a full 32-bit DWORD pointer to the data in any dynamic,
flex, or fixed-length string variable.
þ When a SUB or FUNCTION expects a variable passed by reference, you can use
the BYVAL keyword to pass a dword expression, which evaluates to a pointer
address by value, so that the SUB or FUNCTION may work with the target.
DECLARE SUB MySUB(x AS INTEGER)
DIM z AS INTEGER PTR
z = &HB8000000
CALL MySUB(BYVAL z)
þ 16550 UART support. If a 16550 UART is present when you open a serial port
for communications, a FIFO trigger level of 4 bytes is set. This is very
important when high speed communications are in operation and you're reading
or writing data on a disk (the BIOS disables all interrupts during file I/O
operations). If the "DT" option is used when opening the port, the FIFO
buffers are left enabled when you CLOSE the port. Source code has been
provided in the COMMUNIT.BAS example file if you wish to change the trigger
level settings or disable the FIFO buffer.
þ Optional parameters in BASIC SUBs and FUNCTIONs may now be passed by
reference as well as by value.
þ The LEN() function may now reference a user-defined Type by either the name
of the Type, or by a variable dimensioned as that type. That allows you to
retrieve the actual size of the structure without necessarily allocating any
memory.
þ Underscores (_) may now be used in variable names. Because of this, any
lines of code in your program which use an underscore as a line continuation
character may require a space before the underscore if the preceding word is
a variable name or PowerBASIC keyword. If the underscore follows a non
alpha-numeric character, then no leading space is required.
SUB MySUB(Var1_ 'requires a leading space ,Var2)
SUB MySUB(Var1,_ 'does not require a leading space Var2)
You can use the search and replace utility (PBSR.BAS) included in PowerBASIC
3.2 to automatically insert leading spaces in front of all underscores using
the following command line syntax:
PBSR *.bas "_" " _"
þ Free example source code. Included in the PB32\EXAMPLE directory is a
batch file called BLDPBL.BAT. Execute this batch file and it will create a
free library called PB32.PBL from the source code (see the ????UNIT.BAS
files) included. This new source code includes routines for retrieving the
size of free space on a disk drive, retrieving the date & time for files,
drawing text boxes, saving text screens, and much, much more.
þ Free utilities source code. Included in the PB32\EXAMPLE directory is a
batch file called BLDUTIL.BAT. Execute this batch file and it will create a
set of utilities from the source code included. These utilities include:
FINDFILE.BAS Find that elusive file on your hard drive by quickly scanning
all its directories. Use wildcards when
you're not quite sure what the name is.
DETAB.BAS Remove those leading tabs from lines in source code and replace
them with spaces. Great when you're
working on source code which uses tab settings
different than your own preference.
PBLIST.BAS Browse your source code or other text files without having to
load them into an editor where they might accidentally be modified.
QB2PB.BAS Scan your Microsoft BASIC source code and quickly find the
areas where there are syntax differences
with PowerBASIC.
PBGREP.BAS Quickly scan your source code for special phrases or keywords,
ignoring spaces and upper/lower case
differences.
PBSR.BAS Quickly search for keywords or variable names and replace them
with new ones.
PBMAKE.BAS Create project files to compile all the source files associated
with your program, cutting down on costly mistakes where a unit or object
source was modified but not recompiled.
PBSF.BAS Once your source code is finished, format it by indenting code
blocks, changing the case of keywords, and spacing out your code and
formulas. Great for
making your code more readable and consistent.
PBTOUCH.BAS When the project is complete and you're ready to distribute it,
"touch" the files with a new file date and time to make it easier in tracking
versions when they're out in the real world.
TERMINAL.BAS Dial into the PowerBASIC BBS (or your favorite BBS) and search
through messages for those 'golden little code snippets'.
þ We have compiled a list of Frequently Asked Questions (FAQs) and placed a
series of text files with these questions and their answers in the PB32\FAQ
subdirectory. You'll find information such as linking .OBJ's created in
Borland C or Microsoft C into your programs and saving graphics screens from
EGA and VGA screen modes to a disk file.
--- InterMail/GEcho
---------------
* Origin: Toast House Remote (1:100/560.1)
|