Break Statement
The Break statement does the following:
Stops the innermost loop of the following statements:
For
While
Do
Controls the flow in a Switch statement.
Format A
break;
break label;
The following table describes the arguments you can use with the Break statement.
Argument | Description |
---|---|
label |
The name of the label that indicates where this statement must resume running the script. This label includes the name of a method or a function followed by a colon. |
Usage
You can write code that uses the Break statement only in the following situations:
In a loop. Stops the loop if the code no longer requires the loop.
In a Switch statement. Stops Siebel eScript from running any code that occurs after the Label statement. Causes Siebel eScript to exit the Switch statement.
If you use the Break statement in a nested loop, then it causes Siebel eScript to stop running the script only in this nested loop. If the Break statement occurs in a nested loop, then you can use the label argument to indicate the beginning of the loop that Siebel eScript must stop.
Example
For an example, see Switch Statement.