Action
Exit a FOR..NEXT, DO..LOOP , WHILE ..WEND or SUB..END SUB.
Syntax
EXIT [FOR] [DO] [WHILE] [SUB]
Remarks
With the EXIT ... statement you can exit a structure at any time.
Example
IF a >= b1 THEN
'some silly code
DO 'begin a DO..LOOP
A = A + 1 'inc a
IF A = 100 THEN
'test for a = 100
EXIT DO 'exit the DO..LOOP
END IF 'end the IF..THEN
LOOP 'end the DO
END
IF 'end
the IF..THEN
|