Loop

These are the actions associated with the Loop step type.

Description

Executes the steps between a Loop.Do step and a Loop.End_Loop step, until a Loop.Exit_Loop step is encountered.

Example

This example illustrates a Loop.Do construct.

Type

Action

Recognition

Parameters

Value

Variable

Set_Value

&Var =0

Loop

Do

Log

Message

The variable is &Var

Conditional

If_Then

&Var>3

Loop

Exit_Loop

Conditional

End-If

Loop

End_Loop

Description

Terminates a Loop.Do or Loop.While construct.

Description

Exits a Loop.Do, Loop.For, or Loop.While construct. Execution continues with the step after the End_Loop step. Typically, a Loop.Exit_Loop step is placed within a conditional construct.

Syntax

&variable=begin_value to end_value;

Description

Executes the steps between a Loop.For step and a Loop.Next step until the expression in the Recognition field evaluates to False, at which point the execution skips to the step immediately after the Loop.Next step.

Parameters

Parameter

Description

&variable

The variable to be used in the comparison. This variable is incremented in the Loop.Next step.

begin_value

The starting value.

end_value

The ending value.

Description

Terminates a Loop.For construct. Loop.Next increments the variable in the Loop.For step.

Example

This example illustrates using the Loop.For with Loop.Next to terminate the loop.

Type

Action

Recognition

Parameters

Value

Variable

Set_Value

&Var =0

Loop

For

&Var =1 to 5

Log

Message

The variable is &Var

Loop

Next

Description

Executes the steps between a Loop.While step and a Loop.End_Loop while the expression in the Recognition field evaluates to True.

When the expression evaluates to false, execution skips to the step after the Loop.End_Loop step.

Example

This example illustrates a Loop.While construct.

Type

Action

Recognition

Parameters

Value

Variable

Set_Value

&Var =0

Loop

While

&Var <=3

Log

Message

The variable is &Var

Variable

Set_Value

&Var = add[&Var|1]

Loop

End_Loop