comp.lang.ada
 help / color / mirror / Atom feed
From: dvdeug@x8b4e53cd.dhcp.okstate.edu (David Starner)
Subject: Re: question about functions
Date: 2000/01/20
Date: 2000-01-20T00:00:00+00:00	[thread overview]
Message-ID: <867eof$9ic1@news.cis.okstate.edu> (raw)
In-Reply-To: 867e3p$8ph$1@news.mgn.net

On Thu, 20 Jan 2000 17:44:52 +0100, Pascal LEJEUNE <pascal.lejeune@matra-transport.fr> wrote:
>Hello,
>
>I would like to know if there is a "clean" (i.e. not compiler dependant)
>solution to this problem :

No. There's not even a decent compiler dependent version. This is not an
acceptable way to do whatever you were trying to do. What were you trying
to do?

>I explain :
>if C := f(A, B);
>
>how can i know, in f, C's addres ?
No. 

>function f(A, B : in T) return T is
>   ...
>begin
>   ...
>   address of the result of f ?
>   ...
>end f;

The result is usually copied to a return value before being
copied back. Probably by unchecked conversions between integers
and pointers and the right knowledge of the stack, you could
find the value. (This would be highly system and compiler
specific, and is not recommended.)

-- 
David Starner - dstarner98@aasaa.ofe.org
If you wish to strive for peace of soul then believe; 
if you wish to be a devotee of truth, then inquire.
   -- Friedrich Nietzsche




  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 ` Tucker Taft
2000-01-20  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-22  0:00   ` Andy
2000-01-22  0:00     ` Matthew Heaney
2000-01-24  0:00     ` Stephen Leake
2000-01-20  0:00 ` David Starner [this message]
2000-01-20  0:00 ` Hyman Rosen
  -- 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