which
implements repetition control of a group
of items. A repetition is done while a specified test expression is true.
The group of operators is described in a subgraph. This
subgraph can be opened by double-clicking
on the item.
The number of inputs, output, parameters are specified during
the creation of the item. The number of parameter is at least 2, the
ones used by the test expression.
Properties

Parameters
The parameters are named respectively:
Only the first two ones can be used in the test expression.
Repetition is related to the following instruction:
while (test between $0 and $1) do
execute the related subgraph.
Test Expression
The test is a boolean expression built with conjunction,
disjunction, or negation connectors between constants, and the first two
parameter values.
More complex expression should be composed with the
eval item.
Regular test expressions must be built with:
and the logical connectors:
- & (AND)
- | (OR)
- ^ (XOR)
- ! (NOT)
Example
($0>3.0) | ($1<=5)
Composition of the subgraph
The group of items to iterate is composed in a subgraph.

The input, mask, parameter and output slots of the control structure
are accessible as connection slots in the subgraph:
- Input slots of the While item are located at the top left of the subgraph.
These inputs are used for the first repetition.
- Intermediate input slots are located at the bottom left of the subgraph.
Theses inputs are used for the next repetitions as re-entry inputs.
- Parameter slots are located at the top of the subgraph.
These parameters are used for the first repetition.
The other parameters contains the values defined in the property
dialog of the While item.
- Intermediate parameter slots are located at the bottom of the subgraph.
These parameters are used for the next repetitions as re-entry parameters.
- The mask slot is located at the top of the subgraph.
The mask is the same for each repetition.
- The output slots are located at the bottom right of the subgraph.
These outputs are the final outputs of the repetition.
- The result slot is located at the bottom of the subgraph. This value
is the final result of the While item.
For example, the graph above corresponds to the following snippet of code:
datafile1 = datafile(inputslot$0)
while test(parameter$0,parameter$1, parameter$2)
do
r1=perosion parameter$3 datafile1 datafile2
r2=pvalueclassnumber datafile2
parameter$0 = parameter$0
parameter$1 = r2
cp datafile2 datafile1
done
cp datafile2 outputslot$0
resultslot$0 = r2
Warning
To enable execution, each output as well as the final result
must be linked before execution, even directly with inputs slots.
See also
Go to the reference manual