RENUM
Short for RENUMBER and does pretty much the same, despite different features sometimes: changes the numbers of lines of a program stored in memory.
Implemented by: atxl, msatari, colorext, GWBASIC, MSX, bw32
With variations:
Also written as: RENUMBER
Usage
RENUM is an interpreter command in line-numbered BASICs and will blow your machine if used as a statement within a program in most if not all BASICs. Well, sort of.
Microsoft line-numbered BASICs such as GWBASIC and MSX allow different quantities of arguments. The last one is the new increment to apply in every next line number: it is mandatory and must be higher than 1. The first (mandatory) and second (optional) arguments are, respectively, the new number of the first line to be renumbered and the old line number from which the new number sequence will be applied.
' Make the program start from line 100, with a 10 gap between every line RENUM 100,,10 ' Maybe after merging code into your program you might want it in a lower line range, from 10000 to 2000 here RENUM 2000, 10000, 10
Line numbers used as targets for program flow statements such as ELSE, GOSUB, GOTO, THEN, RESUME, RETURN etc. will be also automatically updated by RENUM in GWBASIC and MSX BASIC.
Variations
GWBASIC allows both arguments to be replaced by a dot (.), meaning "the lastly edited line".