NEXT
NEXT [<list of:<variable>]
FOR n=1 TO 1000:NEXT
COMMAND: Delimits the end of a FOR loop. The NEXT command may be anonymous, or may refer
to its matching FOR, which in the above example would be:
NEXT n
Associated keywords: FOR
ON GOSUB
ON GOTO
ON <integer expression> GOSUB <list of:<line number>
ON <integer expression> GOTO <list of:<line number>
10 ON DAY GOSUB 100,200,300,400,500
10 ON RATE GOT0 1000,2000,3000,4000
COMMAND: GOSUB to the subroutine, or GOTO the statement as directed by the result of the
<integer expression>. If the result is 1, then the first line number in the list is chosen, if 2 then the
second etc. In the above line 10, when DAY = 1, the subroutine at line 100 would be visited.DAY =2
would cause a branch to line 200, and so on.
Associated,keywords: GOTO, GOSUB
ON BREAK GOSUB
ON BREAK GOSUB <line number>
10 ON BREAK GOSUB 40
20 PRINT "program running"
30 GOT0 20
40 CLS
50 PRINT "pressing [ESC] twice calls GOSUB
routine"
60 FOR t=l TO 2000:NEXT
70 RETURN
COMMAND: Calls a subroutine on breaking from program execution by pressing [ESC] twice.
Associatedkeywords: ON BREAK STOP, RETURN