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-08 11:00:41 PST Path: supernews.google.com!sn-xit-02!sienna.impulse.net!207.126.101.70.MISMATCH!sn-xit-01!supernews.com!newsfeed.stanford.edu!news.isc.org!news.gnac.net!uunet!sac.uu.net!usenet.rational.com!not-for-mail From: "Greg Bek" Newsgroups: comp.lang.ada Subject: Re: Representation clause for enumeratives Date: Thu, 8 Feb 2001 10:52:56 -0800 Organization: Rational Software Message-ID: <95uptf$e6n$1@usenet.rational.com> References: <95tqbh$ag7$1@nnrp1.deja.com> NNTP-Posting-Host: ext-2157.rational.com X-Newsreader: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Xref: supernews.google.com comp.lang.ada:5011 Date: 2001-02-08T10:52:56-08:00 List-Id: Sandro, What I think is happening is that AdaMulti is using a 32 bit signed type to represent enumerated values. The 16#8000_0000# value is outside this range. The supplied example compiles with Apex. But if for instance you changed it to 16#8_0000_0000# (thinking you had more than 32 bits) you would get the error: 10:28:19 >>> Line 8: for Typ_Enum use (16#00000002#, 16#00000004#, 16#8_0000_0000#); 10:28:19 *** The internal codes exceed the values representable with the largest target integer type This is because Apex uses a 32 bit unsigned type to store enumerated values. Basically you have hit a compiler limit. I'm not sure if you can use a negative number for the enumerated values with your compiler, if you can then reordering your enumerated type declaration to: type Typ_Enum is (C, A, B); for Typ_Enum use (-16#80000000#,16#00000002#, 16#00000004# ) --^^^^ note the minus sign Greg ------------------------------------------- Greg Bek mailto:gab@rational.com Product Manager Rational Software, Cupertino CA 95014 Ph: +1 408 863 4394 Fax: + 1 408 863 4180 ------------------------------------------- Sandro Binetti wrote in message <95tqbh$ag7$1@nnrp1.deja.com>... > Hi everybody, > >Suppose you have an enumerative type like the following: > >type TYP_ENUM is (A,B,C); > >for TYP_ENUM use( > 16#00000002#, > 16#00000004#, > 16#80000000# -- <<<<< NOTICE THIS VALUE !!! > >); > >My GHS AdaMulti compiler reports this error: > > LRM:4.9(35), The static expression which is not part of a larger >static expression is outside the base range of its expected type. > >My Gnat compiler, on the other side, does not say anything. > >What's wrong with this such a 16#80000000# value? >-- >Ciao, Sandro > > >Sent via Deja.com >http://www.deja.com/