Break function

Syntax

Break

Description

Use the Break statement to terminate execution of a loop or an Evaluate function. The program resumes execution immediately after the end of the statement. If the loop or Evaluate is nested in another statement, only the innermost statement is terminated.

Parameters

None.

Example

In the following example, Break is used to terminate the Evaluate statement, while staying within the outermost If statement:

If CURRENCY_CD = PriorEffdt(CURRENCY_CD) Then
      Evaluate ACTION
      When = "PAY" 
         If ANNUAL_RT = PriorEffdt(ANNUAL_RT) Then
            Warning MsgGet(1000, 27, "Pay Rate Change action is chosen and Pay⇒
 Rate has not been changed.");
         End-if;
         Break;
      When = "DEM" 
         If ANNUAL_RT >= PriorEffdt(ANNUAL_RT) Then
            Warning MsgGet(1000, 29, "Demotion Action is chosen and Pay Rate has⇒
 not been decreased.");
         End-if;
        Break;
      When-other
      End-evaluate;
      WinMessage("This message appears after executing either of the BREAK⇒
 statements or after all WHEN statements are false");
End-if;