User guide

43
VTB USER GUIDE
For var1=0 to var1<8 Repeat 8 times
...
Next var1
For var1=1 to var1<var4 step var3
...
Next var1
For var2=1 to var2<=10
...
Next var2
For var1=10 to var1<var3*var4 step1
...
Next var1
9.9 WHILE-LOOP-EXITWHILE
Allow the execution of a block of instructions until a condition is true.
Syntax
While condition
[instructions]
ExitWhile
Loop
The syntax of the instruction While...loop is composed by the following elements:
condition Mandatory. Any expression with the result True (value not zero) or False (value zero).
instructions Optional. Block of instructions executed until condition is true.
ExitWhile It is used to force the stop of the cycle, the program will continue from the line immediately
after the instruction Loop.
Notes
If the condition is True, the block of instruction will be executed then yhe cycle will be repeated.
More cycles While...loop can be nested at any level. Each instruction loop will correspond to the more recent
instruction While.
Example
Used variables:
Var1 int
while var1<10
...
loop