## ON GOTO/GOSUB

PURPOSE:
To transfer execution to one of many statements based on an INTEGER value.

    STATEMENT SYNTAX:
    stno ON expr GOTO stno0, stno1, ..stnoX
    stno ON expr GOSUB stno0, stno1, ..stnoX

where:
expr = is an INTEGER value used to determine the statement to transfer to.
stno0 = execution continues at this statement if expr is LESS THAN or EQUAL to ZERO.
stno1 = execution continues at this statement if expr is EQUAL to ONE.
stnoX = execution continues at this statement if expr is EQUAL to or GREATER than "X".

    EXAMPLE:
    0100 ON X GOTO 2000, 2500, 1800, 3000
    0100 ON ERR(2,1,499) GOSUB 8000, 8100, 8200, 8300

NOTES:
If the "expr" is not an INTEGER, the value of "expr" will be truncated (to obtain an INTEGER) and then used.
Once the destination statement is determined the statement operates identical to a GOTO or GOSUB that statement number.
SEE:
GOTO and GOSUB