Enumerated Data Types
An enumerated data type declaration specifies that the value of any data element of that type can only be one of the values given in the associated list of identifiers. The enumeration list defines an ordered set of enumerated values, starting with the first identifier of the list, and ending with the last.Enumerated data types can be declared using the following syntax:TYPE : ( );END_TYPEFor example, consider the following declaration of two enumerated data types. Note that, when no explicit value is given to an identifier in the enumeration list, its value equals the value assigned to the previous identifier augmented by one.TYPEenum1: (val1, (* the value of val1 is 0 *)val2, (* the value of val1 is 1 *)val3 (* the value of val1 is 2 *));enum2: (k := -11,i := 0,j, (* the value of j is ( i + 1 ) = 1 *)l := 5);END_TYPEDifferent enumerated data types may use the same identifiers for enumerated values. In order to be uniquely identified when used in a particular context, enumerated literals may be qualified by a prefix consisting of their associated data type name and the # sign.