EXITTO Verb - Unconditional Branch

Syntax

EXITTO lineref

Description

The EXITTO verb performs an unconditional branch using the same logic as GOTO and discards the top entry on the FOR/GOSUB/WHILE stack.

PRO/5 keeps information about FOR .. NEXT, WHILE .. WEND, REPEAT .. UNTIL, and GOSUB .. RETURN in the same stack. An EXITTO leaves an incomplete loop or exits a subroutine to a destination other than the RETURN destination.

In a compound statement, only ELSE, FI, or REM can follow EXITTO. Do not use BREAK.

Examples

100 FOR N=1 TO 100
110 GOSUB 200; IF D$="TUE" THEN EXITTO 130
120 NEXT N
130 PRINT N

See Also

Verbs - Alphabetical Listing