comp.lang.ada
 help / color / mirror / Atom feed
From: stt@henning.camb.inmet.com (Tucker Taft)
Subject: Re: Is 'out' different from 'in out' (Was: Uninitialized "out" parameters)
Date: 1996/07/22
Date: 1996-07-22T00:00:00+00:00	[thread overview]
Message-ID: <DuyC0H.6Fr.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: gauthier-2207961213160001@164.81.60.62


Michel Gauthier (gauthier@unilim.fr) wrote:

: So, I repost the question in another form :
: ___is there a difference between 'out' and 'in out' parameters ?___

At what level?  At the implementation level, for a parameter of an elementary
type, there is a big difference.  No value is copied in (unless
it is of an access type).  No constraint check is performed on the
way in (even if it is of an access type).

For a parameter of a composite type, constraint checks all happen
on the way in in any case (whether, IN, IN OUT, or OUT).  If the
parameter is passed by copy, and has no fields requiring default
initialization, then no copy-in is performed.  If the composite parameter
has fields requiring default initialization, or is passed by reference,
then there is no difference at the implementation level.

: Consequent questions are :
: ___is an 'out' pointer reset to null when entering the subprogram ?___

No; its incoming value is preserved.

: ___is an 'out' controlled object finalised and reinitialised when entering
: the subprogram ?___

No; controlled types are always passed by reference.

: ___is an 'out' record with initial values reinitialised when entering the
: subprogram ?___

No, but its incoming value is preserved, if you mean "has fields
requiring default initialization" when you say "record with initial values."

: Finally, ___an AI discussion might be envisaged___. Don't you think so ?

AI meaning "artificial intelligence"? ;-)  Or AI meaning Ada Interpretation?

If you mean the latter, I believe RM95 is pretty clear on all of the
above points.  Do you have a particularly paragraph that you believe
is ambiguous?

: Michel Gauthier / Laboratoire d'informatique
: 123 avenue Albert Thomas / F-87060 Limoges
: telephone +33 () 55457335 [or ~ 7232]
: fax +33 ()  55457315  [or ~7201]

-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Cambridge, MA  USA




  parent reply	other threads:[~1996-07-22  0:00 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-18  0:00 Uninitialized "out" parameters Paul Whittington
1996-07-18  0:00 ` Robert Dewar
1996-07-19  0:00   ` Peter Amey
1996-07-20  0:00   ` Fergus Henderson
1996-07-20  0:00     ` Robert Dewar
1996-07-21  0:00       ` Fergus Henderson
1996-07-21  0:00         ` Robert Dewar
1996-07-23  0:00           ` Fergus Henderson
1996-07-23  0:00             ` Robert A Duff
1996-07-24  0:00               ` Fergus Henderson
1996-07-24  0:00               ` Fergus Henderson
1996-07-23  0:00           ` Richard A. O'Keefe
1996-07-23  0:00             ` Robert A Duff
1996-07-24  0:00               ` Richard A. O'Keefe
1996-07-24  0:00                 ` Robert A Duff
1996-07-25  0:00                   ` Richard A. O'Keefe
1996-07-25  0:00                     ` Robert A Duff
1996-07-24  0:00                 ` Theodore E. Dennison
1996-07-25  0:00                 ` Frank Manning
1996-07-25  0:00                   ` Richard A. O'Keefe
1996-07-26  0:00                     ` Frank Manning
1996-07-23  0:00             ` Robert Dewar
1996-07-24  0:00               ` Robert A Duff
1996-07-24  0:00               ` Fergus Henderson
1996-07-24  0:00               ` Fergus Henderson
1996-07-25  0:00               ` Richard A. O'Keefe
1996-07-25  0:00                 ` Robert A Duff
1996-07-18  0:00 ` Adam Beneschan
1996-07-18  0:00   ` Robert Dewar
1996-07-19  0:00   ` Dale Stanbrough
1996-07-19  0:00     ` James A. Squire
1996-07-19  0:00       ` Adam Beneschan
1996-07-20  0:00       ` Michael Feldman
1996-07-21  0:00         ` Fergus Henderson
1996-07-21  0:00           ` Michael Feldman
1996-07-21  0:00             ` Robert Dewar
1996-07-22  0:00             ` Fergus Henderson
1996-07-23  0:00               ` Michael Feldman
1996-07-23  0:00                 ` Robert Dewar
1996-07-25  0:00                   ` Fergus Henderson
1996-07-24  0:00                 ` Fergus Henderson
1996-07-24  0:00                 ` Robert A Duff
1996-07-25  0:00                   ` Richard A. O'Keefe
1996-07-19  0:00     ` Adam Beneschan
1996-07-19  0:00   ` Samuel Tardieu
1996-07-19  0:00     ` John Herro
1996-07-19  0:00       ` Tucker Taft
1996-07-23  0:00         ` Peter Hermann
1996-07-23  0:00           ` Robert A Duff
1996-07-19  0:00   ` Pascal Obry
1996-07-19  0:00     ` Peter Hermann
1996-07-19  0:00 ` Peter Amey
1996-07-19  0:00 ` Michel Gauthier
1996-07-21  0:00   ` Robert A Duff
1996-07-21  0:00 ` Robert A Duff
1996-07-22  0:00 ` Is 'out' different from 'in out' (Was: Uninitialized "out" parameters) Michel Gauthier
1996-07-22  0:00   ` Robert A Duff
1996-07-22  0:00     ` Robert Dewar
1996-07-22  0:00   ` Tucker Taft [this message]
1996-07-23  0:00 ` Uninitialized "out" parameters John Herro
1996-07-23  0:00   ` Robert A Duff
1996-07-24  0:00     ` Uninitialized variables, Java example Arra Avakian
1996-07-25  0:00       ` Richard A. O'Keefe
1996-07-25  0:00         ` Robert A Duff
1996-07-25  0:00       ` Robert A Duff
1996-07-23  0:00   ` Uninitialized "out" parameters Robert Dewar
1996-07-24  0:00     ` Peter Hermann
1996-07-26  0:00   ` Stephen J Bevan
1996-07-26  0:00     ` Robert A Duff
1996-07-23  0:00 ` Is 'out' different from 'in out' (Was: Uninitialized "out" parameters) Michel Gauthier
1996-07-23  0:00   ` Robert Dewar
1996-07-24  0:00   ` Pascal Obry
1996-07-25  0:00   ` Tucker Taft
1996-07-24  0:00 ` Uninitialized variables, Java example Felaco
replies disabled

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