From: dik@mcvax.UUCP
Subject: Re: A Problem With Access Types
Date: Sun, 12-Apr-87 11:44:26 EST [thread overview]
Date: Sun Apr 12 11:44:26 1987
Message-ID: <347@zuring.mcvax.cwi.nl> (raw)
In-Reply-To: 124000003@inmet
In article <124000003@inmet> callen@inmet.UUCP writes:
>
> Try something like this (but be forewarned that the code is not necessarily
> going to be portable):
Nor is it going to be fool-proof.
>
> with Unchecked_Conversion;
> with System;
> ...
> type A_REC is
> record
> ...
> end;
>
> type A_ACCESS is access A_REC;
>
> function Make_Pointer is new Unchecked_Conversion(
> SOURCE=>System.Address, TARGET=>A_ACCESS);
>
> A : A_REC;
> A_A : A_ACCESS;
Ah, yes, the pointer to the stack. Note however that your contents
might get lost while youre pointer still exists. (And no, you do
not need UNCHECKED_DEALLOCATION; the contents will deallocate
themselves.)
Useful? Maybe.
Portable? Probably yes.
Advisable? Definitely no.
--
dik t. winter, cwi, amsterdam, nederland
INTERNET : dik@cwi.nl
BITNET/EARN: dik@mcvax
next prev parent reply other threads:[~1987-04-12 16:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <9954@skl-crc.ARPA>
1987-04-10 19:42 ` A Problem With Access Types callen
1987-04-12 16:44 ` dik [this message]
1987-04-08 16:52 bradford
1987-04-12 7:54 ` Randell Jesup
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox