From: "Pat Rogers" <progers@NOclasswideSPAM.com>
Subject: Re: 'Read for pointers
Date: 2000/07/26
Date: 2000-07-26T00:00:00+00:00 [thread overview]
Message-ID: <B8Mf5.332$VS3.50839@nnrp1.sbc.net> (raw)
In-Reply-To: xRLf5.61$M35.39742@news.pacbell.net
<tmoran@bix.com> wrote in message
news:xRLf5.61$M35.39742@news.pacbell.net...
> >I'm not sure I see your point, given the context.
> The "out" parameter is not set to null so if the procedure has a
bug
> so that it isn't set, it will retain its previous value. Any
> uninitialized variable bug can be hard to find. But a pointer is
> especially hard, and in fact most pointers are automatically
> initialized to null, which helps a lot. Here the "out" parameter
> pointer in fact points to an internally correct data structure, just
> the wrong one, or one that might have been deallocated. I think
such
> a bug might take a while to track down.
Having parsed the above a couple of times, let me try to restate what
you're saying, just to be sure I understand it. What I believe
you're saying -- and if so I agree with it (which is why I question my
understanding of it:) -- is this: Given that the value of the actual
is copied in for an access type formal parameter of mode out, if the
subprogram has a bug such that the formal is not updated then the
actual will retain the old value, and this would be a hard bug to
find. If that's what you mean I agree, but it is preferable to
copying back junk, which can certainly happen with by-copy types other
than access types. At least we don't go off into the weeds when
dereferencing the pointer.
--
Pat Rogers Consulting and Training in:
http://www.classwide.com Deadline Schedulability Analysis
progers@classwide.com Software Fault Tolerance
(281)648-3165 Real-Time/OO Languages
Adam ... does not deserve all the credit; much is due to Eve, the
first woman, and Satan, the first consultant.
Mark Twain
next prev parent reply other threads:[~2000-07-26 0:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-26 0:00 'Read for pointers Ted Dennison
2000-07-26 0:00 ` Pat Rogers
2000-07-28 0:00 ` Stephen Leake
2000-07-28 0:00 ` tmoran
2000-07-29 0:00 ` Pat Rogers
2000-07-31 0:00 ` Stephen Leake
2000-07-31 0:00 ` Robert A Duff
2000-07-31 0:00 ` Pat Rogers
2000-07-26 0:00 ` Pat Rogers
2000-07-26 0:00 ` tmoran
2000-07-26 0:00 ` Pat Rogers
2000-07-27 0:00 ` tmoran
2000-07-26 0:00 ` Pat Rogers [this message]
2000-07-27 0:00 ` Ted Dennison
2000-07-27 0:00 ` Pat Rogers
2000-07-27 0:00 ` Ted Dennison
2000-07-27 0:00 ` Pat Rogers
2000-07-28 0:00 ` Stephen Leake
2000-07-31 0:00 ` Ted Dennison
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox