Statement - Exit from a loop statement.

Remarks

The EXIT statement indicates that the current loop (WHILE, REPEAT or FOR) must be finished. The execution continues after the END_WHILE, END_REPEAT or END_FOR keyword or the loop where the EXIT is. EXIT quits only one loop and cannot be used to exit at the same time several levels of nested loops.

attentionAttention

Loop instructions may lead to infinite loops that block the target cycle.

ST Language

This program searches for the first non null item of an array:

iFound = -1; (* means: not found *)
FOR iPos := 0 TO (iArrayDim - 1) DO
   IF iPos <> 0 THEN
      iFound := iPos;
      EXIT;
   END_IF;
END_FOR;

FBD Language

Not available.

LD Language

Not available.

Fixed_Image See also

IF  WHILE  REPEAT  FOR  CASE


Created with the Personal Edition of HelpNDoc: Create cross-platform Qt Help files