comp.lang.ada
 help / color / mirror / Atom feed
From: murphy@beatnix.UUCP (Michael Murphy)
Subject: Re: enumeration literal/internal codes query
Date: 12 Jan 89 00:31:03 GMT	[thread overview]
Message-ID: <2002@elxsi.UUCP> (raw)
In-Reply-To: 1494@wayback.UUCP

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

  parent reply	other threads:[~1989-01-12  0:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1989-01-09 15:25 enumeration literal/internal codes query Arny B. Engelson
1989-01-10 23:15 ` Arny B. Engelson
1989-01-13 17:03   ` Scott Moody
1989-01-16 18:03     ` Badger BA 64810
1989-01-19 19:44       ` Scott Moody
1989-01-31 18:05         ` Arny B. Engelson
1989-01-15  4:42   ` John Goodenough
1989-01-12  0:31 ` Michael Murphy [this message]
1989-01-12 15:51 ` enumeration literal/internal codes stt
1989-01-20 15:04 ` ryer
  -- strict thread matches above, loose matches on Subject: below --
1989-01-13 21:29 enumeration literal/internal codes query rracine
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox