English
Language : 

NSB8 Datasheet, PDF (43/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
ITALIAN TECHNOLOGY
grifo®
EXIT
STATEMENT:
EXIT <line number>
ACTION:
Terminates execution of the currently running FOR NEXT loop and transfers execution to the
specified line.
EXAMPLE:
20 EXIT 95
REMARKS:
EXIT is a special form of GOTO, and is used for roughly the same purpose as GOTO, to transfer
program execution from one point to another. The only difference is that EXIT should be used only
to “jump” from some point within an active FOR NEXT loop to a point outside the loop. When
“jumping” from point to point within a FOR loop, or when no loop is active, GOTO should be used.
Each use of an EXIT statement terminates only the current FOR NEXT loop. See section FOR NEXT
LOOP for the correct method of exiting from nested loops.
ERROR MESSAGES:
CONTROL STACK ERROR
EXIT was used when no FOR loop was being executed.
LINE NUMBER ERROR
OUT OF BOUNDS ERROR
See statement GOTO
SEE ALSO:
Section THE FOR NEXT LOOP
Statement NEXT
Statement FOR
Statement GOTO
NSB8
Rel. 5.10
Page 31