content_image/778283.jpg
## CHAPTER 5 

## Enumerated and Sub range Types 

We have seen the predefined, simple type identifiers Boolean, Char, Integer and Real. By using these type identifiers you can refer to the existing types that they represent. We now show how new ordinal types can be created by two mechanisms: the enumerated type and the subrange type. The enumerated type creates a new type that is unrelated to any other type, while the subrange type creates a new type that has a subset of the values of another existing ordinal type. 

## S.A. Enumerated Types 

An enumerated type definition specifies an ordered set of values by enumerating the constant identifiers which denote the values. 

The ordinal number of the first constant listed is 0; the second one is 1, etc. 

<img src='content_image/778283.jpg'>

