Previous: Integer Types To the Table of Content Next: Subrange Types

- 2.2.6.4 -
TMT Pascal Language Description
Pascal Language Structure
Types

Enumeration Types

Enumeration types are ordinals that represent a set of values specified by a list of identifiers. Enumeration types are defined as follows:
  identifier [,identifier]
Each identifier is a constant of the new type. Identifiers in enumeration types are assigned values with the first equal to zero, the second equal to one, and so on. For instance, the following enumeration type contains the seven days of the week:
  = (Sun, Mon, Tue, Wed, Thu, Fri, Sat);
In type Week, Sun has the value of zero, Mon has the value of one, Tue has the value of two, and so on.

Enumerations are limited to 256 elements.


Previous: Integer Types To the Table of Content Next: Subrange Types
Integer Types Table of Content Subrange Types

- 2.2.6.4 -