comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <spam@spam.com>
Subject: Re: "out" parameters
Date: Fri, 21 May 2004 01:09:59 GMT
Date: 2004-05-21T01:09:59+00:00	[thread overview]
Message-ID: <HFcrc.3987$be.3856@newsread2.news.pas.earthlink.net> (raw)
In-Reply-To: <e26e273.0405201537.35ced9db@posting.google.com>

Jo wrote:

> 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?

This was discussed to death recently, and several times before that. The 
parameter mode ("in", "in out", "out") has nothing to do with the 
parameter passing mechanism.

The simple version of the rules is: Elementary types are always passed 
by copy. Tagged and limited types are always passed by reference. The 
compiler chooses the parameter passing mechanism for all other types. 
The software engineer need rarely be concerned what mechanism the 
compiler chooses.

-- 
Jeff Carter
"C++ is like jamming a helicopter inside a Miata
and expecting some sort of improvement."
Drew Olbrich
51




  parent reply	other threads:[~2004-05-21  1:09 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
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 [this message]
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