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,7d502cbc6396bf1f X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Universal Integer in TO_ADDRESS call Date: 1999/05/29 Message-ID: <7iprd3$p0h$1@nnrp1.deja.com>#1/1 X-Deja-AN: 483571178 References: <375004b1@news.compd.com> X-Http-Proxy: 1.0 x31.deja.com:80 (Squid/1.1.22) for client 166.72.69.195 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Sat May 29 22:57:38 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-05-29T00:00:00+00:00 List-Id: In article <375004b1@news.compd.com>, "David Akister" wrote: > I am trying to do a TO_ADDRESS type conversion while using > XDADA. The two parameter types supported by the compiler are > {universal integer} and ADDRESS_INT. Note that the use of universal integer here is a language extension. In my opinion, a significant enough one that I would hesitate to sign a declaration of conformance (it is one place where GNAT refused to be exactly DEC Ada compatible) > ADDRESS_INT is too short to be used and universal integer > relies on the parameter being a named-number. > > The existing code uses named numbers as constants without > types in the declaration. They of course adopt the universal > integer and everything is fine. > > I need to modify the code and add offsets taken from an array > to this value and the compiler doesn't like it because the > parameter is no longer of type universal-integer. There is absolutely no way to solve this problem. Are you sure that there is not another version of To_Address that takes a longer integer? That is certainly the way it works on DEC Ada 83. The universal integer bogosity is there only to allow unqualified constants to be used without causing ambiguities. If you have a compiler where the ONLY form with full range is universal integer, then that is a rather bad limitation I would say, since as you have found out, there is no way around it. Universal integer is not a first class citizen in the type structure of Ada! Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.