Wend
Wend
ends a While loop of instructions.
While EXPRESSIONINSTRUCTION_LISTWend
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_VALUEWhile abs(func COMPUTE(VARIA)-TARGET)>EXPECTED_PRECISIONVARIA=func ITERATE(VARIA)Wend# Example 2 : let's wait until the database is updated or until a limit hour is reachedTIMEOUT="22:00:00"While time$<TIMEOUTSleep 1Break func DATABASE_UPDATED=1Wend
Wend
delimits the end of a While loop that iterates a loop as long as:
If the condition is false at the beginning of the While loop, no iteration will be done, and the execution will directly resume after the Wend.
Error code | Description |
---|---|
10 | The expression given after Until is not numeric. |
For, To, Next, Step, Break, Repeat, Until, While, If, Then, Else, Elsif, Endif.