Starts a WHILE block. If the expression specified in the Condition field resolves to TRUE, all of the actions following the WHILE action will be executed until a matching END WHILE is found. If the expression evaluates to FALSE, the setup will jump to the first action after the next matching END WHILE, and the actions will continue to be performed from there.
WARNING |
|
|
|
! |
It is possible to create an endless loop that will hang your setup with a WHILE statement. Make sure that you are using an expression that will eventually evaluate to FALSE. |
Action ID: 102
Action Category:
Control Structures
The conditional expression that must resolve to TRUE for the WHILE block to be executed.
Opens the Build Expression dialog which provides a useful interface to help you build your conditional expression.
SEE ALSO |
|
|
|
? |
For more information on expressions, see Chapter 2: Key Concepts and Chapter 15: Expressions in the User's Guide. |
Value |
Simple Message |
Verbose Message |
0 (OK) |
|
|
1 |
Syntax error in WHILE statement. |
Missing value. A value was expected at position <<Start
position of error>>. |
2 |
Syntax error in WHILE statement. |
Missing operator before open parenthesis. There is an operator
missing before the open parenthesis at position <<Start
position of error>>. |
80 |
Syntax error in WHILE statement. |
End of loop not found. |
In this example, we will make a while loop that runs until the variable %Counter% equals ten. (The variable %Counter% would need to be incremented within the loop for this to work, e.g. with an Assign Value action that sets %Counter% to %Counter% + 1.)
Condition: %Counter% < 10
See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab