next up previous
Next: 3.3 Read and write Up: 3.2 Composite actions Previous: 3.2.2 Conditional actions

3.2.3 Loop actions

A loop action contains a single clause of a test action and a body action. Its test action is executed repeatedly. When the evaluation result is true, the body action is executed; otherwise, the loop action finishes.

Besides its input pins and output pins, a loop action also has loop variable pins. Before its execution, all the required input must be available from the input pins. Data on the input pins are then copied to the loop variable pins. The test action each time tests the condition based on these loop variables, and the body action takes the loop variable pins as both input pins and output pins. Whenever the test result becomes false, the loop stops and the loop variables are copied to the output pins as the result.



Thomas Feng 2003-04-18