From: ica2ph@alpha1.csv.ica.uni-stuttgart.de (Peter Hermann)
Subject: Re: Uninitialized "out" parameters
Date: 1996/07/23
Date: 1996-07-23T00:00:00+00:00 [thread overview]
Message-ID: <4t20tb$1bum@info4.rus.uni-stuttgart.de> (raw)
In-Reply-To: Dut6tq.GCD.0.-s@inmet.camb.inmet.com
Tucker Taft (stt@henning.camb.inmet.com) wrote:
: It is hard to know which error is more common, the Ada 83
: one where you create a local read/write variable and then forget to
: assign it on all exit paths to the OUT parameter, or the Ada 95
: one where you forget to initialize the read/write OUT parameter.
: Having experienced the Ada 83 situation for 10 years, I remember
: having made the Ada 83 error several times. It is too early to tell
me too ... and then quickly changing to John Herro's solution.
(while grumbling ;-)
: how it will compare in frequency to the Ada 95 error.
: The main advantage is that it simplifies the language, since
: you only have one rule -- initialize your variables -- rather than
: two. Ada 83's unreadable OUT parameters require a special
: paradigm, and introduce a second class of errors, when you need
: to build up an answer incrementally.
For the Ada83 class of errors I ask you for an example.
I consider the current Ada95 rule a true source of errors
and therefore a nasty property of the language.
I could imagine an Ada2005 where the compiler is obliged to only
allow any downstream reading of mode-"OUT"-parameters
when the context clearly indicates a prior setting,
whatever flow of control was taken before.
BTW, under NO circumstances I would accept an incoming value of
a formal OUT parameter as data to be processed. I am sure you all agree.
I am not satisfied with the language concerning
the handling of non-initialized variables in general.
This has been discussed long time ago.
I remember e.g. the efficiency aspect.
--
Peter Hermann Tel:+49-711-685-3611 Fax:3758 ph@csv.ica.uni-stuttgart.de
Pfaffenwaldring 27, 70569 Stuttgart Uni Computeranwendungen
Team Ada: "C'mon people let the world begin" (Paul McCartney)
next prev parent reply other threads:[~1996-07-23 0:00 UTC|newest]
Thread overview: 104+ 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 ` Richard A. O'Keefe
1996-07-23 0:00 ` Robert Dewar
1996-07-24 0:00 ` Fergus Henderson
1996-07-24 0:00 ` Robert A Duff
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-23 0:00 ` Robert A Duff
1996-07-24 0:00 ` Richard A. O'Keefe
1996-07-24 0:00 ` Theodore E. Dennison
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-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 ` 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-18 0:00 ` Adam Beneschan
1996-07-18 0:00 ` Robert Dewar
1996-07-19 0:00 ` Pascal Obry
1996-07-19 0:00 ` Peter Hermann
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 [this message]
1996-07-23 0:00 ` Robert A Duff
1996-07-19 0:00 ` Michel Gauthier
1996-07-21 0:00 ` Robert A Duff
1996-07-19 0:00 ` Peter Amey
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 ` Tucker Taft
1996-07-22 0:00 ` Robert A Duff
1996-07-22 0:00 ` Robert Dewar
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 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-24 0:00 ` Uninitialized variables, Java example Felaco
-- strict thread matches above, loose matches on Subject: below --
1996-07-29 0:00 Uninitialized out parameters W. Wesley Groleau (Wes)
2016-04-05 12:02 ahlan
2016-04-05 13:17 ` rieachus
2016-04-05 14:07 ` ahlan
2016-04-06 9:45 ` Mark Lorenzen
2016-04-06 21:01 ` Jeffrey R. Carter
2016-04-07 7:10 ` ahlan
2016-04-05 16:19 ` G.B.
2016-04-06 8:19 ` ahlan
2016-04-06 10:17 ` G.B.
2016-04-06 11:44 ` Dennis Lee Bieber
2016-04-06 20:41 ` Niklas Holsti
2016-04-06 20:54 ` Randy Brukardt
2016-04-06 20:47 ` Randy Brukardt
2016-04-06 21:01 ` Randy Brukardt
2016-04-06 21:22 ` Dmitry A. Kazakov
2016-04-07 7:27 ` Randy Brukardt
2016-04-06 11:37 ` AdaMagica
2016-04-06 13:44 ` ahlan
2016-04-06 14:09 ` Mark Lorenzen
2016-04-06 14:10 ` G.B.
2016-04-06 20:53 ` Stefan.Lucks
2016-04-06 21:03 ` Randy Brukardt
2016-04-06 21:12 ` Niklas Holsti
2016-04-06 21:30 ` Randy Brukardt
2016-04-07 9:56 ` Stefan.Lucks
2016-04-07 16:08 ` AdaMagica
2016-04-07 23:02 ` Randy Brukardt
2016-04-08 7:32 ` Dmitry A. Kazakov
2016-04-07 7:52 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox