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=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c9f437cff8842e X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Enumeration representation Date: 1999/09/10 Message-ID: <7rbvhv$1sc$1@nnrp1.deja.com>#1/1 X-Deja-AN: 523523784 References: <37D8E3BC.175DB72C@newtech.it> <37d9061a@news1.prserv.net> X-Http-Proxy: 1.0 x21.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Fri Sep 10 22:09:12 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-09-10T00:00:00+00:00 List-Id: In article <37d9061a@news1.prserv.net>, "Matthew Heaney" wrote: > The image of literal B is of course "B". But I don't know what 'Img will > return if you also use pragma Discard_Names. Well, you know what we do to answer such questions, we consult the super-secret archives known as the GNAT documentation, carefully hidden from sight by being included in every copy of GNAT distributed :-) There we find: <> The exact effect is implementation defined, and choosing the pos seems as reasonable as any other choice. Choosing the representation would be definitely a bad idea, the point of a enumeration representation clause is that it does NOT affect the semantics of programs, ONLY the representation. > GNAT seems to be displaying the value of T'Pos. which, considering the above documentation, is what we expect! > You want to underlying representation. If so, you'll have use > Unchecked_Conversion to convert the literal to an integer, and then display > that. > > An alternative is to use the GNAT-specific attribute 'Enum_Rep (I think > that's what it's called). Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.