March 2000
Intermediate to advanced
576 pages
18h 13m
English
Break Procedure
Break;
Break jumps out of a loop, similar to the
following goto statement:
label BreakOut;
begin
while Condition do
begin
DoSomething;
if AnotherCondition then
goto BreakOut; // like Break;
end;
BreakOut:
// Controls transfer to the statement after the loop
If you call Break
from within nested loop statements, control transfers out of the
innermost loop only. To break out of multiple loops at one time, you
must use a goto statement.
Break is not a real procedure, but is handled
specially by the compiler. If you try to use Break
outside of a loop statement, the compiler issues an error message.
| Continue Procedure, Exit Procedure, For Keyword, Repeat Keyword, While Keyword |
Read now
Unlock full access