EasyManua.ls Logo

NUM 1020 - Exiting the Loop

Default Icon
146 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1 - 12 en-938872/2
1.2.6 Exiting the Loop
Syntax
EXIT
The EXIT instruction is used to exit from an iteration loop (FOR, WHILE or REPEAT)
and go to the next higher nesting level, ignoring any subsequent IF functions.
The word EXIT is used only in IF loops.
Example
Current
loop
Current
loop
WHILE (condition) DO
REPEAT
IF (condition) THEN
(instructions)
IF (condition) THEN
EXIT
ENDI
(instructions)
ENDI
UNTIL (condition)
(instructions)
ENDW
REPEAT
(instructions)
IF (condition) THEN
(instructions)
ELSE
EXIT
ENDI
UNTIL (condition)
(continued)

Table of Contents

Related product manuals