- 2.2.6.4. -
Table of Contents
2. TMT Pascal Language Description
2.2. Pascal Language Structure
2.2.6. Types
2.2.6.4. Enumeration Types
2.2.6.4. 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.
- 2.2.6.4. -