From: gauthier@unilim.fr (Michel Gauthier)
Subject: 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: <gauthier-2207961213160001@164.81.60.62> (raw)
In-Reply-To: 31EEACDA.64880EEB@sage.inel.gov
In article <Duwwqn.AD0@world.std.com>, bobduff@world.std.com (Robert A
Duff) wrote:
>> In article <gauthier-1907961215520001@164.81.60.62>,
>> Michel Gauthier <gauthier@unilim.fr> wrote:
>> >This problem is harmless here, but can lead to counterintuitive
results when
>> >the type implies initialisation (records, controlled types, access types).
>> >Intuitively, the actual parameter should be Finalize'd prior to
entering the
>> >subprogram, and re-Initialize'd as part of elaborating the declarative part
>> >of the subprogram ___Is it the behaviour that results from LRM ?___
>>
>> No. Controlled types are always passed by reference. That is, the
>> formal is a view of the actual (not a copy of it). So no finalization
>> takes place on parameter passing.
Reference vs. copy passing does not seem to be relevant here.
My intuitive view, and I guess the easier to teach, is that 'out'
parameters involve
initialization at the beginning of the subprogram. I remember a discussion
during
the 9X process about 'out', and a conclusion that there was no longer a
difference
between 'out' and 'in out'. Of course, I do not assert that all 83 compilers did
behave the intuitive way.
So, I repost the question in another form :
___is there a difference between 'out' and 'in out' parameters ?___
Consequent questions are :
___is an 'out' pointer reset to null when entering the subprogram ?___
___is an 'out' controlled object finalised and reinitialised when entering
the subprogram ?___
___is an 'out' record with initial values reinitialised when entering the
subprogram ?___
Finally, ___an AI discussion might be envisaged___. Don't you think so ?
---------- ---------- ---------- ----------
Michel Gauthier / Laboratoire d'informatique
123 avenue Albert Thomas / F-87060 Limoges
telephone +33 () 55457335 [or ~ 7232]
fax +33 () 55457315 [or ~7201]
---------- ---------- ---------- ----------
La grande equation de la fin du siecle : windows-X = Mac-Y
The main end-of-century equation : windows-X = Mac-Y
---------- ---------- ---------- ----------
Si l'an 2000 est pour vous un mysticisme stupide, utilisez la base 9
If you feel year 2000 a stupid mystic craze, use numeration base 9
---------- ---------- ---------- ----------
next prev 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 ` 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 ` Robert A Duff
1996-07-25 0:00 ` Richard A. O'Keefe
1996-07-24 0:00 ` Fergus Henderson
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-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-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 ` Michel Gauthier [this message]
1996-07-22 0:00 ` Is 'out' different from 'in out' (Was: Uninitialized "out" parameters) Robert A Duff
1996-07-22 0:00 ` Robert Dewar
1996-07-22 0:00 ` Tucker Taft
1996-07-23 0:00 ` 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-23 0:00 ` Uninitialized "out" parameters John Herro
1996-07-23 0:00 ` Robert Dewar
1996-07-24 0:00 ` Peter Hermann
1996-07-23 0:00 ` Robert A Duff
1996-07-24 0:00 ` Uninitialized variables, Java example Arra Avakian
1996-07-25 0:00 ` Robert A Duff
1996-07-25 0:00 ` Richard A. O'Keefe
1996-07-25 0:00 ` Robert A Duff
1996-07-26 0:00 ` Uninitialized "out" parameters Stephen J Bevan
1996-07-26 0:00 ` Robert A Duff
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