ON GOSUB/ON GOTO
Purpose
These instructions are conditional branch instructions
whose destinations are determined by the specific
values of the program.
After branching, conrol returns via the RETURN instruc
tion (in the subroutine) as in the GOSUB.
Fora
ON <nuoeric expression> GOSUB <line number>{.<line
number>}
ON <numeric expression> GOTO dine number>{,dine
number>}
Description
(1) Control passes to one of the dine numbers> accord
ing to the <numeric expression> value. In other words,
control passes to the line number which matches the
value of the <numeric expressions
(2) The <numeric expression> value must be within the
range of 1 through the number of dine numbers>. If it
includes the fraction part, it is automatically round
ed; if it is negative or exceeds 255
an error occurs.
(3) When the <numeric expression> value is 0 or exceeds
the number of dine numbers>, this instruction is not
executed and control passes to the next statement.
(*0 If the ON GOSUB is specified, the dine number>
3-69