exit repeat | |
Type | control structure |
Dictionary | LCS |
Library | LiveCode Script |
Syntax |
|
Summary | Skips the rest of the current repeat loop and goes to the statement following the end repeat. |
Introduced | 1.0 |
OS | mac, windows, linux, ios, android |
Platforms | desktop, server, mobile |
Example |
|
Related | Keyword: end repeat Glossary: handler, resume, statement, loop, execute, control structure Control Structure: exit, next repeat, repeat, if |
Description | 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. 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 reads a file in chunks and stops the loop when it encounters the end of file or if the file is empty:
|