comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Universal Integer in TO_ADDRESS call
Date: 1999/05/29
Date: 1999-05-29T00:00:00+00:00	[thread overview]
Message-ID: <7iprd3$p0h$1@nnrp1.deja.com> (raw)
In-Reply-To: 375004b1@news.compd.com

In article <375004b1@news.compd.com>,
  "David Akister" <dakister@compd.com> 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.




  reply	other threads:[~1999-05-29  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-29  0:00 Universal Integer in TO_ADDRESS call David Akister
1999-05-29  0:00 ` Robert Dewar [this message]
1999-05-30  0:00 ` Vincent P. Amiot
1999-05-30  0:00   ` Robert Dewar
1999-05-30  0:00     ` David Akister
1999-05-31  0:00       ` Robert Dewar
1999-06-06  0:00 ` Matthew Heaney
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox