EMMA 02

BASIC

  • Home
  • Download
  • Change Log
  • Help
  • Compilation
    • Windows
    • OS X
    • Ubuntu
    • Fedora
    • openSUSE
  • Forums
  • Tape Conversion
  • Machine Code
    • SYSTEM00
    • CDP1801
    • CDP1802
    • CDP1804
    • CDP1805
    • Differences
  • Pseudo Code
    • AMVBAS
    • AM4KBAS
    • CARDTRAN
    • Chip-8, 8X, ETI-660 & Elf
    • FEL-1
    • FPA-1
    • FPL-2
    • FPL-4
    • GPL-2
    • GPL-3
    • GPL-4
    • GPL-A (2K RAM)
    • GPL-A (2K ROM)
    • ST2
    • ST4
    • STK
    • Test-Word
    • Super-chip
  • XML Code
    • Main Elements
    • I/O
    • System
    • A/D Convertor
    • BASIC
    • Batch wav
    • Bootstrap
    • Cassette
    • CD4536B
    • CDP1851
    • CDP1852
    • CDP1854
    • CDP1855
    • CDP1877
    • CDP1878
    • CDP1879
    • Debugger
    • COMX Diagnostic
    • Dip switch
    • Disk
    • EF Buttons
    • Flip Flop
    • Front Panel
    • GUI
    • HEX Modem
    • I/O Group
    • Keyboard
    • Keyfile
    • Locations
    • Memory
    • MM57109
    • Printer
    • RTC
    • Sound
    • Splash
    • USB
    • Video
    • Videodump
    • vt
    • X Modem
  • BASIC
    • General Information
    • COMX BASIC V1.00
    • Floating Point BASIC 2.2
    • Pecom 32 BASIC
    • Pecom 64 BASIC 1.0 & 4.0
    • Quest Super BASIC 1.4
    • Quest Super BASIC 3.0
    • Quest Super BASIC 5.0
    • Quest Super BASIC 6.0
    • RCA BASIC3 V1.1
    • Telmac SBASIC v24.3
    • Error Messages
  • Computer List

 

 

 

 

 

 

 

 

 

 

 

 

RENUMBER

Format: RENUMBER or RENUMBER N

Supported by: COMX BASIC V1.00, Pecom 32 BASIC, Pecom 64 BASIC 1.0 and 4.0, Quest Super BASIC 3.0, 5.0 and 6.0, RCA BASIC3 V1.1, Telmac SBASIC v 24.3

Similar commands: -

The RENUMBER statement allows the user to renumber the lines within a program to a given increment. If no argument follows the RENUMBER statement, the increment defaults to 10, i.e., line numbers 10, 20, 30, and so forth. When n is given, it becomes the initial line number as well as the increment. The n value that is displayed for numbers above 256 will always be module 256. A warning message indicating the number of "computed branches" is issued. A "computed branch" is a statement requiring the computer to branch or jump to another statement the line number of which is yet to be determined. For example, consider the following program.

10 FOR A =1 TO 5
15 N(A) = 0
20 NEXT
25 GOTO 10
RENUMBER 20

will give the message

0 COMP BR

and LIST will give,

20 FOR A=1 TO 5
40 N=0
60 NEXT
80 GOTO 20

Note that the lines have been renumbered. Note also that the statement "25 GOTO 10" has become "80 GOTO 20" since the old line 10 has been renumbered 20. "GOTO 10" is not a "computed branch" (hence the message "0 COMP BR") because the computer is able to determine the line to branch or jump to.

Consider another example, with "GOTO 10" replaced by "GOTO 5*2" (or "GOTO B"),

10 FOR A=1 TO 5
15 N(A)=0
20 NEXT
25 GOTO 5*2
RENUMBER 20

will give the message.

1 COMP BR

and LIST will give.

20 FOR A=1 TO 5
40 N(A)=0
60 NEXT
80 GOTO 5*2

The warning message that there is one "computed branch" prints to the fact that one line, on this case, line 80, will give rise to error because of renumbering. "GOTO 5*2" (and "GOTO B") are examples of "computed branch".