From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 16 Apr 92 20:59:25 GMT From: dog.ee.lbl.gov!overload.lbl.gov!agate!spool.mu.edu!wupost!usc!rpi!sarah!c ook!psinntp!psinntp!vitro.com!v7.vitro.com!vaxs09@ucbvax.Berkeley.EDU Subject: Re: Pointer help Message-ID: <1992Apr16.155925.145@v7.vitro.com> List-Id: In article <1992Apr16.135211.144@v7.vitro.com>, carmencs@vitro.com (Carmen Cast ells-Schofield) writes: > > Can anyone tell me any way to get a pointer to point to a declared data > item rather than an allocated location? Perhaps with a 'ADDRESS? Does thi s > require UNCHECKED_CONVERSION:), or what? Since I happen to know you're running on a VAX, I'll answer for that platform. Try page 2-22 of the Run Time Reference Manual. Basically, you can use an Unchecked_Conversion, but to be safe, the access type must access a record type. It is unclear from that reference whether the operand of the 'ADDRESS attribute must also be a record type. From the LRM, section 13.7.2, however, it seems clear that the result of the 'ADDRESS attribute reliably indicates the location of a data item (rather than a descriptor thereof) and no such restriction should exist. Since the Run Time manual contains an example on page 10-2 of using Unchecked_Conversion between a pointer to an integer and an integer variable 'ADDRESS, it seems unlikely you would have problems with scalars. Clearly, arrays and especially unconstrained arrays would need to be encapsulated in records. John Briggs vaxs09@v7.vitro.com