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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Re-write a file in Ada Date: Tue, 19 Jan 2016 09:54:36 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <77e47c8b-7dcc-4e86-8f89-1f348cdf08dd@googlegroups.com> <8aedb2f3-ec99-4cc5-943f-af7b4af39ed4@googlegroups.com> <8c53de6d-5e52-4aaa-b49e-bc541270af5c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Tue, 19 Jan 2016 16:51:53 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="caa759af2a9c666aec02942f6fe5abd6"; logging-data="8513"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18vO2ExHdQVnWMMwkzReEVYqMjvRBbr3ek=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 In-Reply-To: Cancel-Lock: sha1:gx47xY/3YbyrUfSpB7ikPebDfKY= Xref: news.eternal-september.org comp.lang.ada:29168 Date: 2016-01-19T09:54:36-07:00 List-Id: 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. -- Jeff Carter "So if I understand 'The Matrix Reloaded' correctly, the Matrix is basically a Microsoft operating system--it runs for a while and then crashes and reboots. By design, no less. Neo is just a memory leak that's too hard to fix, so they left him in ... The users don't complain because they're packed in slush and kept sedated." Marin D. Condic 65