WHILE...WEND
Execute a series of instructions in a loop while a given condition remains true.
WebVue support - Yes.
Syntax
WHILE(Expression)
[block of instructions]
WEND
Argument |
Meaning |
Expression |
A boolean condition. |
Execution
- If the Expression is true, all instructions included between WHILE and WEND are executed, then the Expression is evaluated again.
- If the Expression is still true, the process is repeated.
- If the Expression is false, execution continues at the instruction following WEND.
Nesting is possible within the limits of the available resources.
Example
SUB Main()
DIM i as Integer;
i=0;
WHILE (i<3) 'so long as i<3
i++; 'increment i by 1
PRINT(i);
WEND
END SUB