comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic.brenta@insalien.org>
Subject: Re: "out" parameters
Date: Fri, 21 May 2004 01:53:53 +0200
Date: 2004-05-21T01:52:43+02:00	[thread overview]
Message-ID: <874qqairji.fsf@insalien.org> (raw)
In-Reply-To: e26e273.0405201537.35ced9db@posting.google.com

Jo writes:
> Does anyone happen to know whether an "out" parameter in Ada is
> being passed by-copy or by-reference?
>
> If the parameter is a record with neither elementary nor access type
> component in it, then is it true that whether the "out" parameter is
> passed by-copy or by-reference is totally compiler dependent?

Yes, the compiler decides.  Only for tagged types, parameters are
passed by reference no matter what the mode.

Besides by-copy and by-reference, there is also the possibility of
passing parameters in processor registers.

The mechanism chosen also depends on whether or not the called
subprogram is inlined.

-- 
Ludovic Brenta.



  reply	other threads:[~2004-05-20 23:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-20 23:37 "out" parameters Jo
2004-05-20 23:53 ` Ludovic Brenta [this message]
2004-05-21  0:33   ` Georg Bauhaus
2004-05-21 19:17   ` Keith Thompson
2004-05-21 22:25     ` Vinzent 'Gadget' Hoefler
2004-05-22  8:20     ` Martin Krischik
2004-05-25 20:34     ` Robert I. Eachus
2004-05-21  1:09 ` Jeffrey Carter
2004-05-21  9:28 ` Martin Krischik
2004-05-28 23:14   ` Jo
2004-05-28 23:45     ` Marius Amado Alves
2004-05-29  1:45     ` Jeffrey Carter
2004-05-29  7:15     ` Martin Krischik
2004-06-04 21:59 ` Nick Roberts
2004-06-18  0:58   ` Jo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox