comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: scope and/or parameters (beginner)
Date: 1999/04/15
Date: 1999-04-15T00:00:00+00:00	[thread overview]
Message-ID: <7f59oi$tse$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 7f52vj$n90$1@nnrp1.dejanews.com

In article <7f52vj$n90$1@nnrp1.dejanews.com>,
  Robert Dewar <robert_dewar@my-dejanews.com> wrote:
> In article <37155f01.1945002895@news.dsuper.net>,
>   fluffy_dong@dsuper.net wrote:
> > What I'm surprised about is not about a passage through a
> > single sub-program, but through two (2) of them in line,
> > two levels down.
>
> What I am surprised about is that you could think this :-)
>
> (and I read what you said ...)
>
> constant in Ada means constant, it does not mean
> "constant, except that if you call a second level procedure
> you are allowed to modify it"

I suspect he was thinking something along the lines of:
My parameters are being passed via a copy method: "in out" is copy-in-copy-out
and "in" is just copy-in. Therefore there's no harm in allowing the *copy*
inside the ourter routine to be modified, since the modification will not be
copied out.

Of course the fallacy in that is that the Ada compiler (in most cases) is
perfectly free to choose to pass those parameters by reference instead of
copy. So if you rely on the copy mechanisim in order for your algorithm to
work, you will have to do the copying youself!


--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  reply	other threads:[~1999-04-15  0:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-02  0:00 scope and/or parameters (beginner) fluffy_pink
1999-04-03  0:00 ` Matthew Heaney
1999-04-05  0:00 ` Corey Ashford
1999-04-05  0:00   ` fluffy_doo
1999-04-06  0:00     ` Matthew Heaney
1999-04-08  0:00     ` czgrr
1999-04-10  0:00       ` fluffy_puff
1999-04-12  0:00       ` dennison
1999-04-13  0:00         ` Robert Dewar
1999-04-13  0:00         ` czgrr
1999-04-13  0:00           ` Robert Dewar
1999-04-14  0:00             ` czgrr
1999-04-14  0:00               ` dennison
1999-04-14  0:00               ` Robert Dewar
1999-04-15  0:00                 ` czgrr
1999-04-15  0:00                   ` Robert Dewar
1999-04-13  0:00     ` Robert A Duff
1999-04-14  0:00       ` Robert Dewar
1999-04-14  0:00         ` Hyman Rosen
1999-04-14  0:00           ` dennison
1999-04-14  0:00             ` Hyman Rosen
1999-04-14  0:00               ` dennison
1999-04-14  0:00                 ` Hyman Rosen
1999-04-15  0:00                   ` dennison
1999-04-15  0:00                     ` Robert Dewar
1999-04-15  0:00                       ` dennison
1999-04-15  0:00                       ` Hyman Rosen
1999-04-15  0:00           ` Robert Dewar
1999-04-15  0:00             ` Hyman Rosen
1999-04-15  0:00               ` Robert Dewar
1999-04-15  0:00                 ` Hyman Rosen
1999-04-16  0:00               ` Rakesh Malhotra
1999-04-15  0:00       ` fluffy_dong
1999-04-15  0:00         ` Robert Dewar
1999-04-15  0:00           ` dennison [this message]
1999-04-15  0:00             ` fluffy_dong
1999-04-16  0:00               ` Robert Dewar
1999-04-16  0:00                 ` Fraser Wilson
1999-04-16  0:00                   ` Gautier.DeMontmollin
1999-04-20  0:00                     ` Nick Roberts
1999-04-21  0:00                     ` fraser
1999-04-22  0:00               ` Robert A Duff
1999-04-22  0:00                 ` Larry Kilgallen
1999-04-16  0:00         ` Samuel Mize
replies disabled

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