Before you use the Loop component, it is important to understand
the following information:
-
You cannot select parameter types other than the selected
parameter type for expression formation or value substitution. For example,
if you have a For Each loop with a real parameter,
you cannot select a string parameter as one of its values; you can select
only another real parameter. The only exception is that you can select
integer parameters when the loop variable is real.
-
Proper loop execution requires that the parameters
(iteration parameter in For and For
Each loops, and condition parameters in While
and Do Until loops) are mapped correctly between
the parent loop and its subflows.
-
For While and Do
Until loops to function properly, all parameters that are
used in the conditions and that are expected to change their values during
iterations must be input/output parameters. In this case their values
are preserved from one iteration to another by the Loop component. For
example, when creating a While loop with the condition
(N < 10) and a calculator in the subflow with the expression
N = N + 1, you must ensure that parameter N
is an input/output parameter in both the Loop component and the Calculator
component and that the parameter is mapped in both directions. If this
is not done, parameter N's values are always reset to the initial value
at every calculator execution, and the loop ends up executing infinitely
or until it reaches the maximum number of iterations.
-
For all loops except For Array
loops, the values of all output or input/output parameters after the
loop finishes are taken from the last iteration (highest run number,
not the last iteration to finish). Only the For Array
loop’s output arrays allow the values of other iterations to be mapped
to subsequent components.
|