Functions, Operators, Switch Cases and Truth Tables : Constant Operators and Enumerated Types : Resolving Enumerated-Types Values

Resolving Enumerated-Types Values

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:

Enumerated Data Types:

COLOR 1 {RED, GREEN, BLUE}
COLOR 2 {RED, GREEN, BLUE}
 
 

Data-Item:

MY_COLOR1 of type COLOR1
MY_COLOR2 of type COLOR2
 
 

Transition Expression:

[TRUE]/ MY_COLOR1=RED;MY_COLOR2=RED;

In this example, the first RED is resolved to RED in COLOR1, according to the type of MY_COLOR, The second RED is resolved to RED in COLOR2, according to the type of MY_COLOR2.

Limitation:

User-defined enumerated types that use a non-unique enumeration value should be defined in Global Definition Set (GDS).