Sharp MZ-700 Series Owner's Manual page 35

Personal computer
Hide thumbs Also See for MZ-700 Series:
Table of Contents

Advertisement

2. 3. 2. 7 RENUM
(abbreviated format: REN.)
Format
R E N U M
R E N U M
L n
R E N U M
Ln, Lo, n
Ln . . . . New line number
Lo . . . . Old line number
n
Increment
Function
This command renumbers the lines of a BASIC program. When this command is
executed, line numbers referenced in branch statements such as GOTO, GOSUB,
ON ~ GOTO, and ON ~ GOSUB are also reassigned.
R E N U M
Renumbers
the
lines
of
the
current
program in memory so that they start
with 10 and are incremented in units
of 10.
R E N U M
1 0 0
Renumbers
the
lines
of
the
current
program in memory so that they start
with 100 and incremented in units of 10.
R E N U M
1 0 0 , 5 0 , 2 0
Renumbers lines of the current program
in memory starting with line number
50; line number 50 is renumbered to
100, and subsequent line numbers are
incremented in units of 20.
Example~|
The example below shows the result of executing RENUM 100, 50, 20 for a sample
program.
(Before renumbering)
(After renumbering)
5 0
A = 1
6 0
A = A + 1
7 0
P R I N T
1 0 0
G O T O
A
60
1 0 0
A = 1
1 2 0
A = A + 1
' l 4 0
P R I N T
A
1 6 0
G O T O
1 2 0
Note
When specifying the new and old line numbers, the new line number specified must
be larger than the old line number. Note that an error will result if execution of this
command results in generation of a line number which is greater than 65535.

Advertisement

Table of Contents
loading

Table of Contents