OTX Break

From emotive
Jump to: navigation, search

Classification

Name Break
Short Description To direct exiting of a loop
Class End Node
Extension OTX Core library
Group End node related actions
Exceptions -
Checker Rules Core_Chk021
Standard Compliant Yes

OTL Syntax

break LoopName;

Description

A complete loop can be terminated with the OTX break activity. The loop specified in the target property, terminates immediately after the break activity.

Break activities can occur only within in arbitrary nesting depth of loops, see WhileLoop, ForLoop, and ForEachLoop.

Properties

Name Data Type Class Default Cardinality Description
Target - Reference - [1] Name of the outer loop, which should be terminated

OTL Examples

Integer counter = 0;

for (counter; 0; 9) : ForLoop
{
   if (counter == 3)
   {
      break ForLoop;
   }
   else
   {
   }
}

See also

Return
Continue
Throw
TerminateLanes