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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ce0900b60ca3f616 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-07 05:32:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!opentransit.net!wanadoo.fr!proxad.net!feeder2-1.proxad.net!news1-2.free.fr!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Lazy Evaluation [Side-Effects in Functions] References: <9s230d$107b5a$2@ID-25716.news.dfncis.de> <5ee5b646.0111040507.5ca7ea23@posting.google.com> <9s3tl3$111hco$1@ID-25716.news.dfncis.de> <5ee5b646.0111041846.93f3e07@posting.google.com> <9s5eub02j61@drn.newsguy.com> <3be666fe.6426140@News.CIS.DFN.DE> <9s7bfb$11boa1$1@ID-25716.news.dfncis.de> <3be7a31d.1736453@News.CIS.DFN.DE> <9s941c$11mrei$2@ID-25716.news.dfncis.de> <5ee5b646.0111061942.3fa463fb@posting.google.com> <3BE8BBC2.A8563DBD@san.rr.com> <5ee5b646.0111070354.55494ec2@posting.google.com> <87snbqln9w.fsf@deneb.enyo.de> From: Jean-Marc Bourguet Date: 07 Nov 2001 14:24:02 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <3be935f2$0$32061$626a54ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 07 Nov 2001 14:24:03 MET NNTP-Posting-Host: 158.140.208.29 X-Trace: 1005139443 news1-2.free.fr 32061 158.140.208.29 X-Complaints-To: abuse@proxad.net Xref: archiver1.google.com comp.lang.ada:15988 Date: 2001-11-07T14:24:03+01:00 List-Id: Florian Weimer writes: > dewar@gnat.com (Robert Dewar) writes: > > >> Uh, unless you do something like > >> Swap(A(I), I) > >> (where A is an array, of course) > > > > Well yes, we all know Algol-60! (or at least I hope any > > serious student of programming languages does). But there > > is no special problem here. In Algol-60, the effect will be canonical, > > depending on the exact order of statements in the body. > > Even if you use two temporary variables instead of a single one (which > is more usual, but in this case, the implementation hardly reflects > the symmetry of the operation)? Swap(I, A(I)) -- Jean-Marc