From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a1a88c4d509f6381 X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: scope and/or parameters (beginner) Date: 1999/04/15 Message-ID: <7f59oi$tse$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 466785564 References: <37064309.889106243@news.dsuper.net> <37084459.8616007@rocketmail.com> <370b0c99.1137352783@news.dsuper.net> <37155f01.1945002895@news.dsuper.net> <7f52vj$n90$1@nnrp1.dejanews.com> X-Http-Proxy: 1.0 x8.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Apr 15 18:05:12 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1999-04-15T00:00:00+00:00 List-Id: In article <7f52vj$n90$1@nnrp1.dejanews.com>, Robert Dewar 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