NEXTN.

The statement delimiting FOR...NEXT loops. NEXT takes an optional control variable.

NEXT
NEXT J

If the control variable is present then FOR...NEXT loops may be 'popped' automatically in an attempt to match the correct FOR statement (this should not be necessary). If a matching FOR statement cannot be found, a 'Can't match FOR' error will be reported.

Leaving out the control variable will make the program run quicker, but this is not to be encouraged.

See the keyword FOR for more details about the structure of FOR...NEXT loops.

Syntax

NEXT [<n-var>{,<n-var>}]

Associated Keywords