stt@ada-uts (01/12/89)
Unchecked-conversion to integer is the most straightforward way to determine the internal code used for an enumeration value. There is some pushing for Ada9X to have an attribute function similar to 'POS which will return the internal code rather than the position number (plus the inverse, analagous to 'VAL). S. Tucker Taft Intermetrics, Inc.
ryer@inmet.UUCP (01/20/89)
When you put a rep spec on an enumerated type, the type is more like a bit string or packed integer than just a "pure" enumeration. When you start accessing the internal value with explicit code, the type begins to look quite unlike an enumerated type. Perhaps the application that wants to use these types would be happier with _named constants_ of a type that is a packed array of booleans or an integer with a restricted range. I'm sure that someone will be proposing access to the internals of an enumerated type for Ada 9X, so it may be important to know whether the particular application really wants to be coded that way. Mike Ryer Intermetrics