Escape statement
SYNTAX:
escape_stmt = ESCAPE ';' .
An escape statement causes an immediate transfer to the statement following the repeat statement in which it appears.
NOTE - This is the only way a repeat statement which according to the repeat control would be in an infinite loop, can be terminated.
Rules and restrictions:
An escape statement shall only occur within the scope of a repeat statement.
Example:
The escape statement passes control the statement following the end repeat
Â
if a <0.
REPEAT UNTIL (a=1);
...
 IF (a < 0) THEN
  ESCAPE;
 END_IF;
...
END_REPEAT;
– control transferred to here