NEXT
Action

Ends a FOR..NEXT structure.

Syntax

NEXT [var]

Remarks

var The index variable that is used as a counter when you form the structure with FOR var. Var is optional and not needed.
You must end each FOR statement with a NEXT statement.

See also
FOR


Example


y = 10 'make y 10
FOR a = 1 TO 10 'do this 10 times
FOR x = y TO 1 'this one also
PRINT x ; a 'print the values
NEXT 'next x (count down)
NEXT a 'next a (count up)

END