The Break Statement

Syntax

$ BreakStatement = BREAK ";"

Description

The Break statement breaks the currently running cycle and directs the control to the operator following the cycle. If there is no enclosing cycle in the statement’s block, the statement does nothing.

Example

Sub Main;

Var

i: Integer;

Begin

For i := 1 To 20 Do

Debug.WriteLine("Hi");

Break;

Debug.WriteLine("Hello");

End For;

End Sub Main;

After executing the example only "Hi" is displayed in the console window.

See also:

Statements