305 RENUMBER Purpose When you type in a program you give each instruction a line number. As the program develops you quite often have to insert extra lines between other lines. You might well need to insert 25 lines between line numbers 300 and 310 – difficult! The RENUMBER command will go through your program and renumber it automatically. It recalculates things like GOTO 220 – which might well become GOTO 180 etc.
However if your program contains the statement GOTO 100 and there is no line 100 then the RENUMBER command will be unable to deal with the problem and will say Failed at line If you renumber a program containing an ON GOTO statement which contains a calculated line number, eg ON X GOTO 120,240,2*R,1000,2000 references prior to the calculated line will be renumbered. However it will not recalculate a calculated line number or other line numbers in the same statement–ie 2*R,100 and 2000 in the example given. The command RENUMBER will renumber your program giving the first line the number 10, the second 20 and so on.
The command RENUMBER 200 will give the first line of your program the number 200, the second will become line 210 etc. The command RENUMBER 200,4 would renumber starting with line 200 and then using 204, 208 etc. RENUMBER is a command: it cannot be used in a program, or as part of a multiple statement line. RENUMBER Examples RENUMBER 100,20 RENUMBER 6000