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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5850c59062ca527a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-02 12:39:22 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!news.mathworks.com!transfer.stratus.com!noc.near.net!inmet!spock!stt From: stt@spock.camb.inmet.com (Tucker Taft) Subject: Re: Type System.ADDRESS Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. References: <395ecb$bjq@theopolis.orl.mmc.com> Date: Wed, 2 Nov 1994 05:51:47 GMT Date: 1994-11-02T05:51:47+00:00 List-Id: In article <395ecb$bjq@theopolis.orl.mmc.com>, Bob Gilbert 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