comp.lang.ada
 help / color / mirror / Atom feed
From: stt@spock.camb.inmet.com (Tucker Taft)
Subject: Re: Type System.ADDRESS
Date: Wed, 2 Nov 1994 05:51:47 GMT
Date: 1994-11-02T05:51:47+00:00	[thread overview]
Message-ID: <CyMLMB.7M7@inmet.camb.inmet.com> (raw)
In-Reply-To: 395ecb$bjq@theopolis.orl.mmc.com

In article <395ecb$bjq@theopolis.orl.mmc.com>,
Bob Gilbert <rgilbert@orl.mmc.com> wrote:

>In article IEr@inmet.camb.inmet.com, 
>stt@dsd.camb.inmet.com (Tucker Taft) writes:

>->What do you mean by "static" when referring to System.Address?
>->-Tucker Taft
>
>I wish I knew exactly what I mean by static, but from the vendor
>in question they state:
>
>  Any assignments to type System.Address require a static expression.
>
>Apparently this limitation is what mucks up my generics.

I suspect the limitation has to do with "address clauses,"
rather than "assignments."  I am not surprised that a vendor
requires the address in an address clause to be a link-time
constant.  If they do shared generics, that probably means
you can have an address clause inside a generic.

Address clauses are relatively nonportable in general,
though we hope to see some improvement with Ada 9X.

In the meantime, a somewhat (;-) more portable solution is
to use access values, defined by an unchecked conversion from 
System.Address.  So long as the designated subtype is
not an unconstrained array subtype, most compilers
have no problem converting Addresses to access values.
(Rational compilers used to be an exception -- I don't know whether
Apex is any different in this regard.)

Note that Ada 9X has a package designed explicitly for
this conversion (System.Storage_Elements.Address_To_Access_Conversions).

>-Bob

-Tucker Taft  stt@inmet.com
Intermetrics, Inc.
Cambridge, MA  02138



  parent reply	other threads:[~1994-11-02  5:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-31 20:28 Type System.ADDRESS Bob Gilbert
1994-11-01  3:11 ` Tucker Taft
1994-11-01 13:04   ` Bob Gilbert
1994-11-01 23:04     ` Norman H. Cohen
1994-11-02  5:51     ` Tucker Taft [this message]
1994-11-02 15:45       ` Bob Gilbert
1994-11-07 11:22         ` David Emery
1994-11-03 11:27     ` David Emery
1994-11-03 11:31     ` Robert Dewar
1994-11-03 10:08 ` Robert I. Eachus
1994-11-03 11:30 ` Robert Dewar
1994-11-03 18:23   ` Bob Gilbert
replies disabled

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