home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
basic
/
library
/
pb
/
library2
/
tb2pb.inf
< prev
next >
Wrap
Text File
|
1994-04-11
|
1KB
|
25 lines
A principal change in syntax from Turbo Basic to PowerBASIC involves the use
of duplicate names in variables, labels, subs, etc. An excerpt from the
latest PowerBASIC readme file:
In PowerBASIC, variables, labels, DEF FN functions, FUNCTIONs,
SUBs, modules ($LINK files), and external public labels (in .OBJ
files $LINKed into your program) cannot share names with each
other. In other words, you cannot have both a variable called
COUNT% and a SUB called COUNT in the same program. You can,
however, share names between variables: A$, A$$, A%, A&, A&&, A!,
A#, A##, A@, and A@@ are 10 distinct variables. There were
several things which necessitated this change, but certainly the
most significant was performance. If the compiler had to
maintain multiple classes of identifiers with identical names,
it would have significantly degraded compilation performance.
Of course an added benefit is the fact that your programs will
be easier to read and understand (for example, in "PRINT ABC",
is "ABC" a variable, or a call to the FUNCTION "ABC"? Worse
yet, within the FUNCTION "ABC", does "ABC = 1" refer to the
return value of the function, or an external or shared variable
by the same name?).
Bob Zale (PowerBASIC R&D)