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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.16.8 with SMTP id y8mr30232521ioi.15.1453224746154; Tue, 19 Jan 2016 09:32:26 -0800 (PST) X-Received: by 10.182.231.229 with SMTP id tj5mr368333obc.13.1453224746135; Tue, 19 Jan 2016 09:32:26 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.mb-net.net!open-news-network.org!feeder.erje.net!1.us.feeder.erje.net!news.ripco.com!news.glorb.com!h5no6758864igh.0!news-out.google.com!kr2ni3191igb.0!nntp.google.com!o2no4487634iga.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 19 Jan 2016 09:32:25 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=149.32.224.36; posting-account=Qh2kiQoAAADpCLlhT_KTYoGO8dU3n4I6 NNTP-Posting-Host: 149.32.224.36 References: <77e47c8b-7dcc-4e86-8f89-1f348cdf08dd@googlegroups.com> <8aedb2f3-ec99-4cc5-943f-af7b4af39ed4@googlegroups.com> <8c53de6d-5e52-4aaa-b49e-bc541270af5c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0bd2873c-e940-4fbd-b508-64d15e8e0249@googlegroups.com> Subject: Re: Re-write a file in Ada From: Anh Vo Injection-Date: Tue, 19 Jan 2016 17:32:26 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:29169 Date: 2016-01-19T09:32:25-08:00 List-Id: On Tuesday, January 19, 2016 at 8:54:41 AM UTC-8, Jeffrey R. Carter wrote: > On 01/19/2016 07:35 AM, Simon Wright wrote: > > > > I think you must mean > > > > while not End_Of_File (This_File) loop > > > > which isn't really much simpler than > > > > loop > > exit when End_Of_File (This_File); > > In fact, it's less simple, because it involves thinking about the continuation > condition and using negative logic. It's more natural to think about the exit > condition than the continuation condition, and positive logic is simpler than > negative. > > At the Ada Launch on 1980 Dec 10, Ichbiah said that Ada had a while loop to > facilitate automatic translation from other languages, but new code should use exit. After reading it a couple more times, the explicit exit statement is clearer. Thus, I would like to retract my suggestion. Anh Vo