Error getting tags :
error 404Error getting tags :
error 404 exit repeat | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
exit repeat
Basics
Expander triangle
Type
Control Structure
Syntax
exit repeat
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Skips the rest of the current repeat loop and goes to the statement following the end repeat.
Examples

if x > 0 then exit repeat

Additional Comments
Expander triangle

Use the exit repeat control structure to skip the rest of a repeat loop.

Form:

The exit repeat statement appears on a line by itself, anywhere inside a repeat control structure.

Comments:

After an exit repeat statement, none of the remaining statements in the current loop is executed, and any more loops are skipped. The handler resumes executing at the first statement after the end of the repeat loop.

Usually, exit repeat is used within an if control structure, so that the loop stops if a condition is true and continues if the condition is false. This example stops the loop when the user presses the mouse button:

repeat with x = 1 to the number of cards

go card x

if the mouse is down then exit repeat -- bail out

end repeat

User Comments
Expander triangle