You can define the valid values for a variable or field as a list of symbolic constants. These are referred to as enumerated types.

Syntax: type enum-type: [name1[=exp],â~@¦][(bits|bytes: width-exp)];

EXAMPLE

type priority_t:[high, medium, low];type packet_kind_t:[good, bad];

By default, the new enumerated type is 32 bits, but it can be sized according to the number of bits required.

EXAMPLE:type direction_t:[READ,WRITE](bits:1);

Default first enum value is 0. Subsequent enum values are increment by 1. This internal value is used for comparisons(with strong type matching maintained).Values can be explicitly assigned with the syntax: