Until
Until
ends a Repeat loop.
RepeatINSTRUCTION_LISTUntil EXPRESSION
INSTRUCTION_LIST
is a list of instructions in a script.EXPRESSION
is a numeric expression that is considered as true if it is not equal to 0.# Example 1 : let's perform a computation with successive approximationsVARIA=INIT_VALUERepeatVARIA=func ITERATE(VARIA)Until abs(func COMPUTE(VARIA)-TARGET)<EXPECTED_PRECISION# Example 2 : let's wait until the database is updated or until a limit hour is reachedTIMEOUT="22:00:00"RepeatSleep 1Break func DATABASE_UPDATED=1Until time$>=TIMEOUT
Until
ends a Repeat loop if:
At least one iteration is done on the Repeat
..Until
loop, even if the condition is true when the loop starts. This is because the condition is evaluated only at Until
statement.
Error code | Description |
---|---|
10 | The expression given after Until is not numeric. |
For, To, Next, Step, Break, Repeat, While, Wend, If, Then, Else, Elsif, Endif.