To iterate over a range of enumerated data with consecutive
values, in the loop counter, cast the enumerated data to a built-in
integer type. The size of the built-in integer type must be big enough
to contain the enumerated value.
For example, suppose you define an enumerated type ColorCodes as