Siebel eScript Language Reference > Statements Reference > Guidelines for Using Siebel eScript >

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;

Format B

break label;

Table 16 describes the arguments you can use with the Break statement.

Table 16. Arguments for 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.

Siebel eScript Language Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.