OTX WhileLoop

From emotive
Jump to: navigation, search


Name WhileLoop
Short Description Loop that is iterated until the condition evaluates to false.
Class Action
Extension OTX Core library
Group Core related actions
Exceptions -
Checker Rules -
Standard Compliant Yes

OTL Syntax

// While (do)
while (BooleanTerm) : WhileLoopName

//Do while
} while (BooleanTerm) : WhileLoopName


The OTX (do) WhileLoop activity contains a sequence of activities that are executed repeatedly until the condition evaluates to false. The expression for the condition is either before (while) or calculated according to (do while) the loop and tested.

Icons Note.png Please keep in mind that Do While at least once iterate loop!

The loop can be exited about the activities of break, return, or throw. The continue activity stops the current iteration and continues with the next iteration, without having to leave the loop.


Name Data Type Class Default Cardinality Description
IsPostTested Boolean Value - [0..1] The condition is tested before the execution of the loop (while false) or afterwards (true, do-while)
Test Boolean Term - [1] Continue the loop condition expression

OTL Examples

Integer Integer1;

while (Integer1 < 10) : WhileLoop1
   Integer1 = (Integer1 + 1);

   Integer1 = (Integer1 + 1);
} while (Integer1 < 10) : WhileLoop2

See also