Command group | Flag affected | Reversible | Execute on client | Platform(s) |
---|---|---|---|---|
Constructs | NO | NO | YES | All |
End While
This command marks the end of a While loop. When the condition specified at the start of the loop is not fulfilled (testing the flag or calculation) the command after the End While command is executed. Each loop that begins with a While command must terminate with an End While command, otherwise an error occurs.
Calculate lCount as 1
While lCount<=3 ## While loop
Calculate lCount as lCount+1
End While
OK message {Count=[lCount]} ## prints 'Count=4'
Calculate lCount as 1
Repeat ## Repeat loop
Calculate lCount as lCount+1
Until lCount>=3
OK message {Count=[lCount]} ## prints 'Count=3'