Command group | Flag affected | Reversible | Execute on client | Platform(s) |
---|---|---|---|---|
Constructs | NO | NO | YES | All |
Repeat
This command repeats a command or series of commands that are contained in a loop closed by an Until command. Each time the command is repeated, Omnis tests the condition attached to the Until command to ensure that the condition is true. If the condition is true, the commands in the loop are not executed and the command after the Until is executed. However, if the condition is false, Omnis jumps back to the first command following the Repeat command.
An error will result if there is a Repeat command without a matching Until command. Repeat loops always execute at least once. The Repeat– Until logic test is carried out at the end of the loop, after the commands in the loop are executed, whereas the While–End While logic test is carried out at the beginning of the loop.
Repeat
Yes/No message {Press Yes to exit loop}
Until flag true
Repeat
No/Yes message {Press No to exit loop}
Until flag false
Repeat
Prompt for input Enter a value greater than 10 to exit loop Returns lValue
Until lValue>10