<< Click to Display Table of Contents >> Navigation: »No topics above this level« EXIT statement |
mapp Services V5.16
If the EXIT statement occurs in a FOR, WHILE or REPEAT statement, this repeat statement is exited. For nested repeat statements, only the innermost repeat statement is exited using with EXIT.
EXIT;
FOR Var1 := 0 TO 1 DO
FOR Var2 := 0 TO 2 DO
IF Var3 = 3 THEN
EXIT;
END_IF;
Var4 := 4;
END_FOR;
Var5 := 5;
END_FOR;
If "Var3" has the value 3, the innermost repeat statement is exited using the EXIT statement. In this case, statement "Var5 := 5" is executed after the EXIT statement.