The Control Structure: While
A control structure While is an item 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.
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.
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:
($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:
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
To enable execution, each output as well as the final result must be linked before execution, even directly with inputs slots.
Go to the reference manual