From: Tucker Taft <stt@averstar.com>
Subject: Re: question about functions
Date: 2000/01/20
Date: 2000-01-20T19:19:32+00:00 [thread overview]
Message-ID: <38875FBF.8F18F5BD@averstar.com> (raw)
In-Reply-To: 867e3p$8ph$1@news.mgn.net
Pascal LEJEUNE wrote:
>
> Hello,
>
> I would like to know if there is a "clean" (i.e. not compiler dependant)
> solution to this problem :
>
> - i have a function, for example : f(A, B : in T) return T
> - how can i find the return address in f ?
>
> I explain :
> if C := f(A, B);
>
> how can i know, in f, C's addres ?
> function f(A, B : in T) return T is
> ...
> begin
> ...
> address of the result of f ?
> ...
> end f;
>
> Thank you for your help
There is no way to know the address of the object being assigned the
result of the function call. I don't know of any language that would
provide this. Note that the function result might not be stored into a
variable at all.
You need to change your function into a procedure with an OUT parameter,
then use 'Address on the OUT parameter, if knowing the address is
essential.
> Pascal LEJEUNE
--
-Tucker Taft stt@averstar.com http://www.averstar.com/~stt/
Technical Director, Distributed IT Solutions (www.averstar.com/tools)
AverStar (formerly Intermetrics, Inc.) Burlington, MA USA
next prev parent reply other threads:[~2000-01-20 0:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-01-20 0:00 question about functions Pascal LEJEUNE
2000-01-20 0:00 ` David Starner
2000-01-20 0:00 ` Hyman Rosen
2000-01-20 0:00 ` Stephen Leake
2000-01-22 0:00 ` Andy
2000-01-22 0:00 ` Matthew Heaney
2000-01-24 0:00 ` Stephen Leake
2000-01-22 0:00 ` Matthew Heaney
2000-01-24 0:00 ` Stephen Leake
2000-01-25 0:00 ` Matthew Heaney
2000-01-27 0:00 ` Stephen Leake
2000-01-24 0:00 ` Mats Weber
2000-01-20 0:00 ` Tucker Taft [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-01-21 0:00 Pascal LEJEUNE
2000-01-21 0:00 ` tmoran
2000-01-21 0:00 ` Samuel T. Harris
2000-01-21 0:00 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox