Wend

Wend ends a While loop of instructions.

Syntax

While EXPRESSION
INSTRUCTION_LIST
Wend

Examples


  # Example 1 : let's perform a computation with successive approximations
  VARIA=INIT_VALUE
  While abs(func COMPUTE(VARIA)-TARGET)>EXPECTED_PRECISION
    VARIA=func ITERATE(VARIA)
  Wend

  # Example 2 : let's wait until the database is updated or until a limit hour is reached
  TIMEOUT="22:00:00"
  While time$<TIMEOUT
    Sleep 1
    Break func DATABASE_UPDATED=1
 Wend

Description

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.

Associated errors

Error codeDescription
10The expression given after Until is not numeric.

See also

For, To, Next, Step, Break, Repeat, Until, While, If, Then, Else, Elsif, Endif.