Loops while or until the expression specified is true. With each successive loop, the expression is re-evaluated. The loop ends after the condition is met or when a Break is encountered. Used to continue executing a block of steps while or until a condition is met.
Declaration
<AMLOOPEXPRESSION EXPRESSION="text [valid BASIC expression]" CONDITION="text [options]">
(block of steps to loop)
See Also: Loop, End Loop, Loop Array, Loop Files, Loop Windows, Loop Expression, Loop Dataset, Loop List, Loop List Control, Loop Tree Control
To set Loop Expression properties
In the Available Actions pane, open the Loop folder and double-click the Loop Expression action or drag it into the Steps pane.
Select Loop while the expression is true or Loop until the expression is true.
In the Expression box, type the expression, or click the percent sign (%) and use the Expression Builder to create it.
To set the Description tab properties, refer to Description Tab Options.
To set the Error Causes and On Error tab properties, refer to Step Error Handling.
When finished, click OK to save settings and close the properties dialog box.
To auto-indent after all steps are added
In the Steps pane, hold down SHIFT and click the first and last steps in the block so that the complete block of steps is selected.
Click Format .
Property |
Type |
Required |
Default |
Markup |
Description |
Condition |
Text (options) |
Yes |
While |
CONDITION="until" |
Specifies whether the loop should continue while the expression is true or until it is true. The available options are:
|
Expression |
Text |
Yes |
(Empty) |
EXPRESSION="thenumber=55" |
Specifies a valid BASIC expression that should be evaluated on each loop. |
This action includes the Description tab for entering a custom step description.
More on setting custom step description
This action also includes the standard Error Causes and On Error failure handling options/tabs.
More on Error Handling Options
All text fields allow the use of expressions, which can be entered by surrounding the expression in percentage signs (example: %MYVARIABLE%, % Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by pressing F2.