Skip to main content

Compiler Error C0217

Message: Case label <case label> also contained in range <case range begin> .. <case range end>

Possible error cause: A CASE label is part of the range of another CASE label.

Error correction: Make sure that there is no intersecting.

Example 440. Example of the error:
PROGRAM PLC_PRG
VAR
    i : INT;
END_VAR
CASE i OF
  3..5: i := i+2;
  4: i := i+2;
ELSE
  i := i+10;
END_CASE;

Message:

C0217: Case label 4 also contained in range 3 .. 5