Explanation
EXIT Statement
Exits a DO or FOR loop, a FUNCTION or SUB procedure, or a DEF FN function.Worth knowing
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
Useful and cross-version information about the programming environments of QBasic, QuickBasic and Visual Basic for DOS.
EXIT {DEF | DO | FOR | FUNCTION | SUB} |
DEF | Exits a DEF FN function. |
DO | Exits a DO loop. |
FOR | Exits a FOR loop. |
FUNCTION | Exits a FUNCTION procedure. |
SUB | Exits a SUB procedure. |
i% = 0
DO
i% = i% + 1
IF i% = 500 THEN EXIT DO
LOOP
PRINT "EXIT at"; i%