Flow Control
There are a number of statements that can affect the flow of statement execution within a script.
Changing the Flow of a Repeat Loop
In addition to the statements listed here, return and pass statements will terminate execution of a repeat loop (see Messages).
Next Repeat
Causes any statements following the next repeat statement, down to the end repeat, to be skipped and execution to jump directly back to the beginning of the current (innermost) repeat loop. Execution then continues with the next iteration.
Syntax:
next repeat
Exit Repeat
Terminates execution of the current (innermost) repeat loop. Script execution proceeds with the next statement following end repeat.
Syntax:
exit repeat