Loop commands
Loop commands cause a block of code to be repeated until a condition is met. See a comprehensive list of all these commands.
While (while
) command
Runs a block of code while a condition is true.
End While (endWhile
) command
Ends the block of code started by the While command.
Begin Do-While (repeat
) command
Starts a block of code that runs while the condition defined in the End Do-While remains true.
End Do-While (until
) command
Defines the condition to run the block of code in the Begin Do-While command and terminates that block
of code.
For (for
) command
Runs a block of code while an integer counter is not reached.
Next (next
) command
Runs the block of code in the For command one time more. Also terminates this block of code when the integer
counter reaches its limit.
For Each (foreach
) command
Runs a block of code for each item stored in a collection. The loop runs for every item in the collection or until the
Break command is called.
End For Each (endFor
) command
Ends the block of code in the For Each command.
Go to (goto
) command
Advances or returns to a line in the script. Add a label to this line in the script using the Insert Label (label
) command.
Interrupt loop (break
) command
Interrupts a block of code inside a loop command, such as the For, For Each, While and Begin Do-While commands.
Continue (continue
) command
Interrupts the current iteration to start a new iteration in a loop.