Next Command

Marks the end of a For loop.

Syntax

Next variable

where variable is optional, but if specified, it must match the variable specified by the For command.

Example

DECLARE Test_Value

'This example will print 1, 2, 3, 4, 5.

FOR Test_Value = 1 TO 5

PRINT "Test value = ",Test_Value

NEXT Test_Value