5.1.1 Programs with Line Numbers
If you use line numbers in your program, you must follow
these rules:
.
A line number must be a unique integer from 1 to 32767.
If a VAX BASIC, if a program contains duplicate line
numbers, the last line with that number replaces the pre-
vious one. DEC BASIC does not allow programs to have
duplicate line numbers.
.
A line number can contain leading zeros; however, em-
bedded spaces, tabs, and commas are invalid in line
numbers.
.
There must be a line number on the first line of the
program.
.
If a source file contains subprograms, then each subpro-
gram must begin on a numbered line.
Note, that in a multiple-unit program with line num-
bers, any comments following an END, END SUB, or END
FUNCTION statement become a part of the previous sub-
program during compilation unless they begin on a numbered
line. This is not the case in multiple-unit programs without
line numbers.
Although line numbers are not required, you may want to
use them on every line that can cause a run-time error, de-
pending on the type of error handling you use. See Chapter
16 for more information about handling run-time errors.