When multiple instances of the same Enumeration value exist in the scope, the value is resolved according to the variable type it is assigned to.
For example, assume the existence of the following in the scope:
In this example, the first
RED
is resolved toRED
inCOLOR1
, according to the type ofMY_COLOR
, The secondRED
is resolved toRED
inCOLOR2
, according to the type ofMY_COLOR2
.User-defined enumerated types that use a non-unique enumeration value should be defined in Global Definition Set (GDS).