From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: ** X-Spam-Status: No, score=2.6 required=5.0 tests=BAYES_20,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!lll-winken!ames!ucsd!sdcsvax!trantor.harris-atd.com!x102c!bbadger From: bbadger@x102c.uucp (Badger BA 64810) Newsgroups: comp.lang.ada Subject: Re: enumeration literal/internal codes query Summary: What can you DO with the representation? Keywords: enumeration, literal, representation Message-ID: <1438@trantor.harris-atd.com> Date: 16 Jan 89 18:03:51 GMT References: <1494@wayback.UUCP> <1499@wayback.UUCP> <1074@shuksan.UUCP> Sender: news@trantor.harris-atd.com Reply-To: bbadger@x102c.harris-atd.com Organization: Harris GISD, Melbourne, FL List-Id: In article <1074@shuksan.UUCP> scott@shuksan.UUCP (Scott Moody) writes: >I too have run into all of the same problems that you have mentioned. The 'pos >doesn't work which leaves the Unchecked Conversion method. I would also >think that the language should provide some better (cleaner) method >of retrieving that value; especially since the language provides a >clean method of describing those values (using rep specs). I've been wondering why you *want* to access the ``internal'' representation. The standard use for representation clauses on enumeration types is to ``hide'' a specific encoding so that you *don't* have to deal with the ``ugly'' numeric representation directly. The only thing I've thought of is to use it as an ``external representation'' to be written to a file. Normally, of course, you would just instantiate SEQUENTIAL_IO on the enumeration type, or on a record type with a component of the enumeration type. But in that case, you don't really ``see'' the representation in the program, it only appears in the file. So, please give an example of how accessing the representation would be useful. Bernard A. Badger Jr. 407/984-6385 | ``Use the Source, Luke!'' Secure UNIX Products | That's not a bug! It's a feature! Harris GISD, Melbourne, FL 32902 | Buddy, can you paradigm? Internet: bbadger@x102c.harris-atd.com | 's/./&&/' Tom sed [sic] expansively.