RENUM
Statement
RENUM
[new
line]
[,[line]
[,increment]]
Renumbers a program, starting at line, using
new
line as the first new
line and
increment for the new sequence.
If you omit
new
line, BASIC starts numbering at line 10. If you omit
the
line, it renumbers the entire program. If you omit increment, it
jumps
10 numbers between lines.
RENUM also changes all line number references appearing after
GOTO, GOSUB, THEN, ELSE,
ON
...
GOTO,
ON
...
GOSUB,
ON
ERROR GOTO, RESUME, and ERL[relational operator].
Examples
RENUM
renumbers the entire resident program, incrementing by 10's. The
new number of the first line will
be
10.
RENUM
600t
5000t
100
renumbers all lines numbered from 5000 up. The first renumbered line
will become
600, and
an
increment of 100 will
be
used between
subsequent lines.
RENUM
10000
t
1000
renumbers line 1000 and
all
higher-numbered lines. The first
renumbered line will become line
10000.
An
increment of
10
will be
used between subsequent line numbers.
RENUM
100
t t
100
renumbers the entire program, starting with a new line number of 100,
and incrementing
by
100's. Notice that the commas must be retained
even though the middle argument is gone.
Error Conditions
1.
RENUM cannot
be
used to change the order of program lines. For
example, if the original program has lines numbered
10, 20 and
30, then the command:
RENUM
15t
30
2-151