For … Next

Implements a For … Next loop within a Math worksheet or Command animation. The section of the script affected by the loop begins with the For() function call and ends with the Next notation. The Next notation directs back to the beginning of the loop.

Function Group Execution Windows Embedded Thin Client
For Loop N/A Supported Supported Supported


For( numInitialValue, numFinalValue, numStep ) … Next
The initial step (increment) of the loop.
The final step (increment) of the loop.
The step (increment) of the loop.

Returned value

Returns the step on which the loop is currently running.


Tag Name Expression
Tag For( 1, 5, 1 )
Note: You must partner every For function with a Next notation. As shown in the example, you must place the Next notation in the tag field of the math script.