home *** CD-ROM | disk | FTP | other *** search
- * Line Descriptors:
- In TARBELL BASIC, line descriptors may not only be line
- numbers, as in conventional BASIC'S, but also may be any
- alphanumeric string of characters (including numbers),
- except spaces or punctuation. If the descriptor is in a
- statement that is referencing another statement, it may
- have an offset appended. The offset is indicated by the
- symbol "+" or "-". This feature may be used to greatly
- increase readability, and thus increase maintainability of
- programs.
-
- Line descriptors need only be used on lines which are referred
- to by another statement, such as a GOTO, GOSUB, GOPROC, RESTORE,
- etc. Line descriptors are used in a similar fashion to the
- labels in assembly language. A line descriptor may be a number,
- just as in normal BASIC's, but need not be in any order. Line
- descriptors usually are chosen with names that mean something
- in the program, so that it will be easy for the programmer to
- remember the name of a particular line or subroutine.
-
- See Appendix G for more examples of the use of line descriptors.
-
- Examples:
-
- SORT A=B+6 "SORT" is the descriptor, in this case, the
- name of the statement.
- GOTO SORT+1 "SORT+1" is the descriptor, indicating a
- transfer to the statement following "SORT". That
- statement may or may not have a name of it's own.
- GOSUB SORT - 5 "SORT - 5" is the descriptor, indicating a transfer
- subroutine call to the statement 5 lines before
- the statement named "SORT".
- 10 FOR N=1 TO 5 Line numbers can still be used, but need
- 05 PRINT N,SQR(N) not be in order, and are not used to
- 20 NEXT N edit in the same manner as other BASIC's.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 2
-
-
-
-
-
-
-