FANDOM



This command will define a program loop that will loop a finite number of times.

Syntax
NEXT Variable
Parameters
Variable

Value
Enter the appropriate value here.

Returns

This command does not return a value.

Description

The FOR command requires a variable and two values to begin the loop. The variable stores the first value, and is incremented by 1 each loop until it reaches the second value. The NEXT command is placed to mark the end of the loop. As the variable increments during the loop, you can use its value in many ways. You can increase the size of this increment by using the STEP command.

Example Code
FOR T=1 TO 10

PRINT T

NEXT T

WAIT KEY