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.6 required=5.0 tests=BAYES_00,FROM_WORDY autolearn=no 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-10 08:37:22 PST Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!nntp.flash.net!news.flash.net!not-for-mail From: "Ken Garlington" Newsgroups: comp.lang.ada References: <95tqbh$ag7$1@nnrp1.deja.com> <962n4v$fmg$1@nnrp1.deja.com> Subject: Re: Representation clause for enumeratives X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <27eh6.3787$y03.254014@news.flash.net> Date: Sat, 10 Feb 2001 16:37:18 GMT NNTP-Posting-Host: 65.65.209.243 X-Complaints-To: abuse@flash.net X-Trace: news.flash.net 981823038 65.65.209.243 (Sat, 10 Feb 2001 10:37:18 CST) NNTP-Posting-Date: Sat, 10 Feb 2001 10:37:18 CST Organization: FlashNet Communications, http://www.flash.net Xref: supernews.google.com comp.lang.ada:5101 Date: 2001-02-10T16:37:18+00:00 List-Id: "Robert Dewar" wrote in message news:962n4v$fmg$1@nnrp1.deja.com... : In article , : "Ken Garlington" wrote: : > As an aside, here's some fun you can have with the following : package in GNAT : > 3.12p: : : > -- But change it to the following, and you get "value not in : >range of type : > 'Standard.Integer'" : > -- (I only changed the first value to -1; it's not in : Standard.Integer? :) : > : > for Object use( : > -1, : > 16#7FFF_FFFF#, : > 16#8000_0000# : > ); : : No, it's the 2**31 value at the end (16#8000_0000#) that : is not in the range of Standard.Integer. GNAT will use a : 32 bit unsigned representation if it can, but if you use : a negative value, you force the use of a signed representation. Hence the smiley face :) in the prior post :) By the way, this description of the shifting of the allowable range (selecting different unbiased representations) would be very useful in the GNAT user guide. I couldn't find it. : P.S. The one undesirable behavior in GNAT that I see, and will : fix is that the error flag is not clearly placed on the : particular literal that is causing trouble! Which was also my point.