While calculation

Command group Flag affected Reversible Execute on client Platform(s)
Constructs NO NO YES All

Syntax

While calculation

Description

This command starts a While–End While loop that continues while a calculated condition remains true. When the condition is not satisfied the method jumps out of the loop and the first command after the closing End While is executed. A loop that begins with a While command must terminate with an End While otherwise an error occurs.

Example

Calculate lCount as  1
While lCount<=3 ## While loop
  Calculate lCount as lCount+1
End While
OK message {Count=[lCount]} ## prints 'Count=4'