[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.2.10.2 Enumerated Types

 
type
  enum type identifier = (name identifier, ..., name identifier);

An enumerated type defines a range of elements which are referred to by identifiers. Enumerated types are ordered by occurence in the identifier list. So, they can be used as index types in an array definition, and it is possible to define subranges of them. Since they are ordered, they can be compared to one another. The intrinsic function Ord applied to name identifier returns the number of occurence in the identifier list (beginning with zero), Pred and Succ return the predecessor and successor of name identifier.

See also

section 8.2.10.3 Array Types, section 8.2.10.1 Subrange Types, section 9.181 Ord, section 9.201 Pred, section 9.271 Succ



This document was generated by Frank Heckenbach on May, 10 2002 using texi2html