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=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!lll-winken!ames!xanth!nic.MR.NET!umn-d-ub!rutgers!apple!vsi1!wyse!mips!prls!pyramid!nsc!datack!altnet!altos86!elxsi!beatnix!murphy From: murphy@beatnix.UUCP (Michael Murphy) Newsgroups: comp.lang.ada Subject: Re: enumeration literal/internal codes query Message-ID: <2002@elxsi.UUCP> Date: 12 Jan 89 00:31:03 GMT References: <1494@wayback.UUCP> Sender: news@elxsi.UUCP Reply-To: murphy@beatnix.UUCP (Michael Murphy) Organization: ELXSI Super Computers, San Jose List-Id: The 'POS attribute can be used to find the position of the enumeration, which is the same as the internal representation when there is no representation specification. If there is a rep-spec on the enumeration, then you do have a bit of a problem. I believe that at least one implementation provides a 'REP attribute for this purpose, but you will not find that on most compilers. The obvious way to find the internal representation in all cases is to use an unchecked conversion from the enumeration value to an integer variable. Unchecked_conversion is the typing-loophole that allows you to manipulate your view of any object's internal representation. -- michael murphy -- UUCP: {uunet|sun}!elxsi!elk!murphy -- AT&T: 408-942-0900