Renum
The ReNum (RENU) command selectively moves and/or renumbers line numbers in BR programs.
Comments and Examples
ReNum instructs BR to change all line numbers and line number references of a program, such as GOTO or GOSUB statements.
The system produces an error message when you attempt to change a line number to one that already exists. An error message also appears if renumbering would produce a line number greater than 99,999.
The first example renumbers an entire program. The new numbers start with line number 1000 and use the default increment of 10.
RENUM 1000
The following example renumbers lines 00245 through 00365. The first of these lines is renumbered to 00250 and following line numbers are incremented by 10:
RENUM -00245 -00365 250
Syntax
RENUM [-<from line number> [-<to line number>]] [<first line number> [<increment>]] [LABELS ONLY]
Defaults
- Renumber the entire program.
- Renumber the program from the starting line number to the end of the program.
- Renumber the program starting with line number 00010.
- Increment by 10.
Parameters
Two optional parameters renumber a program segment and place it into its proper order within the program: from line number is the starting program line of the block you wish to renumber.
To line number is the line at which the renumbering should end. Each parameter must be preceded with a dash so that the system can differentiate it from the 1st line number, which is preceded by a space.
1st line number parameter is used to specify the first number that BR should use in its renumbering. Do not use a dash before this line number, as BR then interprets it as a from line number.
Increment specifies how much the system should increase the numbers from one line to the next. You must indicate a 1st line number to use this parameter.
As of BR version 4.18a a LABELS_ONLY parameter was introduced which will convert line references to label references, e.g. references to line 01220 will become references to label L01220. Line 01220 itself may be renumbered to a different line number, but will be labeled L01220.