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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c6e6cdf6ff50e684 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-02-12 01:16:07 PST Message-ID: <3A87A8E7.FA749BC8@baesystems.com> Date: Mon, 12 Feb 2001 09:12:07 +0000 From: Stuart Palin Organization: BAE SYSTEMS Avionics, Rochester X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en,pdf MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Representation clause for enumeratives References: <95tqbh$ag7$1@nnrp1.deja.com> <3A829EB8.A098925E@baesystems.com> <95uae3$n5j$1@nnrp1.deja.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: rc2966.rochstr.gmav.gecm.com X-Trace: 12 Feb 2001 09:05:39 GMT, rc2966.rochstr.gmav.gecm.com Path: supernews.google.com!sn-xit-03!supernews.com!freenix!fr.clara.net!heighliner.fr.clara.net!grolier!btnet-peer0!btnet-feed5!btnet!newreader.ukcore.bt.net!pull.gecm.com!rc2966.rochstr.gmav.gecm.com Xref: supernews.google.com comp.lang.ada:5149 Date: 2001-02-12T09:12:07+00:00 List-Id: Robert Dewar wrote: > > In article <3A829EB8.A098925E@baesystems.com>, > Stuart Palin wrote: > You could try it, but it would of course not compile :-) > > It is always a good idea to try compiling examples before > you post them. I supposedly know Ada reasonably well, but I > still find it easy to have a mind-slip now and then, and try > to follow this discipline myself :-) I plead guilty to ignoring Robert's oft given advice, and apologize to the court :-) I would write out the proper answer 100 times - but I don't think anyone would like that; however, for the record I provide what I should have written (checked with XD-Ada [83]). type TYP_ENUM is (C,A,B); -- NOTICE: 'C' has the lowest value representation and -- so must come first. for TYP_ENUM use( -16#80000000#, -- NOTICE: the "-" 16#00000002#, 16#00000004#); (other caveats and advice given elsewhere in this thread apply) -- Stuart Palin