home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / SIMTEL / CPMUG / CPMUG031.ARK / TBASIC.2 < prev    next >
Text File  |  1984-04-29  |  2KB  |  64 lines

  1. * Line Descriptors:
  2.     In TARBELL BASIC, line descriptors may not only be line
  3.     numbers, as in conventional BASIC'S, but also may be any
  4.     alphanumeric string of characters (including numbers),
  5.     except spaces or punctuation.  If the descriptor is in a
  6.     statement that is referencing another statement, it may
  7.     have an offset appended.  The offset is indicated by the
  8.     symbol "+" or "-".  This feature may be used to greatly
  9.     increase readability, and thus increase maintainability of
  10.     programs.
  11.  
  12.     Line descriptors need only be used on lines which are referred
  13.     to by another statement, such as a GOTO, GOSUB, GOPROC, RESTORE,
  14.     etc.  Line descriptors are used in a similar fashion to the
  15.     labels in assembly language.  A line descriptor may be a number,
  16.     just as in normal BASIC's, but need not be in any order.  Line
  17.     descriptors usually are chosen with names that mean something
  18.     in the program, so that it will be easy for the programmer to
  19.     remember the name of a particular line or subroutine.
  20.  
  21.     See Appendix G for more examples of the use of line descriptors.
  22.  
  23.     Examples:
  24.  
  25.     SORT A=B+6    "SORT" is the descriptor, in this case, the
  26.             name of the statement.
  27.     GOTO SORT+1    "SORT+1" is the descriptor, indicating a
  28.             transfer to the statement following "SORT". That
  29.             statement may or may not have a name of it's own.
  30.     GOSUB SORT - 5    "SORT - 5" is the descriptor, indicating a transfer
  31.             subroutine call to the statement 5 lines before
  32.             the statement named "SORT".
  33.     10 FOR N=1 TO 5        Line numbers can still be used, but need
  34.     05 PRINT N,SQR(N)    not be in order, and are not used to
  35.     20 NEXT N        edit in the same manner as other BASIC's.
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                 2
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.