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/13 Message-ID: <7rjn38$7e1$1@nnrp1.deja.com>#1/1 X-Deja-AN: 524542352 References: <37D8E3BC.175DB72C@newtech.it> <7rcceh$anh$1@nnrp1.deja.com> <7rhkte$na7$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x24.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: Mon Sep 13 20:33:45 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-13T00:00:00+00:00 List-Id: In article , Keith Thompson wrote: > Hmm. Ok, suppose you have an enumeration type Foo. It may or may not > have an enumeration representation clause; if it does, it may or may > not assign negative values to some of the literals. How do you > declare an integer type that's guaranteed to be the same size and > signedness? You look and see whether it is signed!!! If you insist on not knowing it is harder. It is even harder if you insist on handcuffing yourself and typing with your nose :-) In a real situation, you know what type you are dealing with and the section of code that has the enum type can export the corresponding integral type and indeed the routine for doing the conversion! Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.