OTX Reference  
OpenTestSystem.Otx.Core.Nodes.Node.EndNode.Break Class Reference

Loop terminate prematurely More...

Inheritance diagram for OpenTestSystem.Otx.Core.Nodes.Node.EndNode.Break:
Inheritance graph

Public Attributes

OtxName target
 Name of the target loop node More...
- Public Attributes inherited from OpenTestSystem.Otx.Core.Nodes.Node
System.Boolean disabled
 To turn on/off a node. A deactivated node is not executed at run time. More...
- Public Attributes inherited from OpenTestSystem.Otx.Core.UniversalTypes.NamedAndSpecified
ExtensibleData[] extendedData
 Declares general data for NamedAndSpecified which can be extented by new general data defined in new OTX extensions using the standardised extension mechanism. For example it can be used to specify specification relevant content in a better structured way. More...
OtxId id
 Unique identifier of an element More...
MetaData metaData
 Additional tool-specific data More...
OtxName name
 Name of an element More...
System.String specification
 Descriptive specification More...

Detailed Description

Loop terminate prematurely

A Break node forces Loop (ForEachLoop, ForLoop, WhileLoop) execution to complete immediately. Control is passed to the next node after the "broken" Loop node. Break can be used only within Loop nodes, at any nesting depth. Break is a controlled jump with a well-defined jump target, namely the next node after the Loop.

break LoopName;
// Local Declarations
Integer counter = 0;
// Flow
for (counter; 0; 9) : ForLoop
if (counter == 3)
break ForLoop;
Checker rules
CheckerRule.Core_Chk021 - correct nesting of Break node
See also

Member Data Documentation

◆ target

OtxName OpenTestSystem.Otx.Core.Nodes.Node.EndNode.Break.target

Name of the target loop node

Names the target Loop node which is forced to complete immediately. If the attribute is omitted, the default target is the innermost Loop. Otherwise, the value must match the name attribute of the targeted Loop in the procedure.