home *** CD-ROM | disk | FTP | other *** search
/ Boston 2 / boston-2.iso / DOS / PROGRAM / BASIC / POWBASIC / LIBRARY2 / TB2PB.INF < prev    next >
Text File  |  1993-12-01  |  1KB  |  25 lines

  1. A principal change in syntax from Turbo Basic to PowerBASIC involves the use
  2. of duplicate names in variables, labels, subs, etc.  An excerpt from the
  3. latest PowerBASIC readme file:
  4.  
  5.        In PowerBASIC, variables, labels, DEF FN functions, FUNCTIONs,
  6.        SUBs, modules ($LINK files), and external public labels (in .OBJ
  7.        files $LINKed into your program) cannot share names with each
  8.        other.  In other words, you cannot have both a variable called
  9.        COUNT% and a SUB called COUNT in the same program.  You can,
  10.        however, share names between variables: A$, A$$, A%, A&, A&&, A!,
  11.        A#, A##, A@, and A@@ are 10 distinct variables.  There were
  12.        several things which necessitated this change, but certainly the
  13.        most significant was performance.  If the compiler had to
  14.        maintain multiple classes of identifiers with identical names,
  15.        it would have significantly degraded compilation performance.
  16.        Of course an added benefit is the fact that your programs will
  17.        be easier to read and understand (for example, in "PRINT ABC",
  18.        is "ABC" a variable, or a call to the FUNCTION "ABC"?  Worse
  19.        yet, within the FUNCTION "ABC", does "ABC = 1" refer to the
  20.        return value of the function, or an external or shared variable
  21.        by the same name?).
  22.  
  23. Bob Zale (PowerBASIC R&D)
  24.  
  25.