Skip to main content

Compiler Error C0125

Message: The constant <constant value> is assigned to more than one enumeration.

Possible error cause: The same value is assigned to two or more enumerations.

Error correction: Assign different values to the enumerations.

Example 390. Example of the error:
PROGRAM PLC_PRG
VAR
    inst : DUT;
END_VAR

TYPE DUT :
(
    enum_member := 0,
    enum_member2 := 0
);
END_TYPE

Message:

C0125: The constant 0 is assigned to more than one enumeration.