ENUMERATED Type

12-1
The ENUMERATED type is used to constrain a component to a defined set of values. Each defined value is named using a name identifier similar to a component name. Associated with each name is a unique integer value (which can be signed), for example:
Color  ::= ENUMERATED {  red(0),blue(1),yellow(2),                          green(3),black(7) }

External Form -- Input and Output

The external form must be one of the names listed in the ENUMERATED type. The enumerated values are not allowed (that is,
red
is valid, 0 is not).

Local Form and Behavior

Internally, the ENUMERATED value is kept in the same manner, and is subject to the same local form constraints, as an INTEGER of the binary local form.

Named Values

Named values are not applicable to the ENUMERATED type.

Constraints

If a component indirectly references an enumerated type, it is possible to constrain it to a subset of the set of named values. For example:
X Y(ONE, FIVE, SIX) Y ::= ENUMERATED {ONE(1), TWO(2), THREE (3), FOUR (4), FIVE (5), SIX (6)}
Component X is restricted to a subset (one, five, six) of the named values of type Y (one, two, three, four, five, six).