BREAKFOR

Top  Previous  Next

Syntax

BREAKFOR

Description

Exits a FOR/NEXT loop early

Parameters

none

Return value

none

Remarks

BREAKFOR allows an early exit of a FOR/NEXT loop before the loop has finished all of the iterations.

The command cannot be used with a FOR/EACH loop.

See Also: FOR, NEXT, Loop Statements

Example usage

FOR x = 1 TO 100
    IF x = 50 THEN BREAKFOR
NEXT x
PRINT x