English
Language : 

NSB8 Datasheet, PDF (31/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
ITALIAN TECHNOLOGY
grifo®
REN
COMMAND:
REN
REN <line number>
REN <line number>, <increment value>
ACTION:
The entire current program is renumbered. The first line in the program is given the line number
specified in the REN command (10 if no line number is specified). If a line number is given, then an
optional increment value may be added to the command. All line numbers will automatically be
separated by the given increment value (10, if no increment is specified). The increment value, if
used, must be an integer, from 1 to 32767.
EXAMPLES:
REN
REN 1000
REN 1000,100
After the command REN 100 the program A will be changed to program B:
program A
1 REM READS AND PRINTS DATA
2 REM IN LINE 1000
3 READ Z
10 IF Z<0 THEN 2000
70 PRINT Z \ GOTO 3
1000 DATA 1,2,3,-1
3000 REM LINE 2000 HASN’T YET BEEN WRITTEN
program B
100 REM READS AND PRINTS DATA
110 REM IN LINE 1000
120 READ Z
130 IF Z<0 THEN 2000
140 PRINT Z \ GOTO 120
150 DATA 1,2,3,-1
160 REM LINE 2000 HASN’T YET BEEN WRITTEN
REMARKS:
Renumbering is usually done to produce a uniform increment value between statement numbers so
that inserting new statements becomes more convenient.
It is not possible to specify an increment value without giving a line number as well, but a line number
may be specified without an accompanying increment value, in which case the increment is assumed
to be 10.
Note that, while program references to line numbers (such as those found in GOTO, GOSUB,
RESTORE, and similar statements) are modified to reflect the program’s new line number structure,
references to line numbers in REM statements remain unchanged.
If a GOTO, GOSUB, RESTORE, or similar statement in the original program references a non-
NSB8
Rel. 5.10
Page 19