Loop Expression Action

Description

Loops while or until the expression specified is true. With each successive loop, the expression is reevaluated. The loop ends after the expression condition is met or when a Break is encountered.

Used to continue to execute a block of steps while or until a condition is true.

Declaration

<AMLOOPEXPRESSION EXPRESSION="text [valid BASIC expression]" CONDITION="text [options]">
  (block of steps to loop)
</AMLOOP>

Examples

<!--- simple incrementing counter --->
<AMVARIABLE NAME="mycounter">1</AMVARIABLE>
<AMLOOPEXPRESSION EXPRESSION="mycounter=5" CONDITION="until">
<AMINCREMENTVARIABLE RESULTVARIABLE="mycounter">
</AMLOOP>

General Tab Parameters

CONDITION: Specifies whether the loop should continue while the expression is true or until it is true.

  • Loop while the expression is true (while): The loop will continue while the expression is true

  • Loop until the expression is true (until): The loop will continue until the expression is true.

Text [options], Optional default: while
MARKUP: CONDITION="until"

Expression: Specifies a valid BASIC expression that should be evaluated on each loop. Click the Expression Builder icon to build and insert an expression.

Text, Required
MARKUP: EXPRESSION="thenumber = 55"

See Also

Loop, End Loop, Loop Files, Loop Windows, Loop Processes, Loop Dataset, Loop List, Break