RENUM Verb - Renumber Program Lines
Syntax
RENUM
Description
For BBj-specific information, see RENUM
Verb - BBj.
RENUM renumbers the lines in the workspace program. Other BASICs allow
arguments with the RENUM verb to control the renumbering process. In PRO/5,
however, special information embedded in REM statements control the renumbering.
Each program can then contain its own renumbering specifications. PRO/5
begins renumbering at line 10 and increments successive lines by 10. As
special REM statements are encountered, the renumbering pattern is changed
until another special REM is encountered. The following are examples of
REM commands:
Command |
Description |
1000 REM 1000 |
Makes this line 1000, and count by 10s. |
1000 REM 1000,2 |
Makes this line 1000, and count by 2s. |
1000 REM ^100 |
Makes this line the next higher multiple of 100, and count by 10s. |
1000 REM ^100,5 |
Makes this line the next higher multiple of 100, and count by 5s. |
1000 REM 0 |
Turns off renumbering until the next special REM. |
An !ERROR=21 is issued if the renumbering overlaps line numbers or if
line numbers exceed 65534. If this occurs, type ESCAPE in console mode
to display the line causing the problem.
Any text may follow the RENUM arguments in a REM:
1000 REM 1000 - MAIN LOOP
RENUM does not renumber line 1, unless line 1 is a REM statement explicitly
forcing a new line number. Application programs normally begin at line
10, with REM statements identifying the program. A SETESC statement placed
at line 1 traps any escapes that may occur during a load. Because the
SETESC is retained, line 1 remains as line 1. Line 1 can be moved manually
to line 2 by using the EDIT command.
RENUM only recognizes a REM command if it is the only statement on the
line. In addition, RENUM can only be executed in console mode and may
not be part of a compound statement. RENUM performs a RESET and sets the
interpreter to begin execution at line 1.
Examples
>RENUM