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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3323ee59cb66d2b6 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!elnk-atl-nf2!newsfeed.earthlink.net!stamper.news.atl.earthlink.net!stamper.news.pas.earthlink.net!newsread1.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: do while loop help ( newbie) References: <1139094979.043765.42770@g14g2000cwa.googlegroups.com> <1139114348.153402.214530@g14g2000cwa.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <2XuFf.5355$5E3.3412@newsread1.news.pas.earthlink.net> Date: Sun, 05 Feb 2006 22:25:02 GMT NNTP-Posting-Host: 67.150.73.106 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.news.pas.earthlink.net 1139178302 67.150.73.106 (Sun, 05 Feb 2006 14:25:02 PST) NNTP-Posting-Date: Sun, 05 Feb 2006 14:25:02 PST Xref: g2news1.google.com comp.lang.ada:2786 Date: 2006-02-05T22:25:02+00:00 List-Id: Bj�rn Persson wrote: > None of those are as clean as a loop-and-a-half with "exit when". What's > wrong with "exit when"? It's not even a loop and a half. It's a full loop with the test at the end. At the Ada Launch, 1980 Dec 10, Ichbiah, Barnes, and Firth introduced their new language (now called Ada 80). They said "while" was included in the language only to facilitate automated translation from other languages. For new code, they recommended not using "while", since it often involves negative logic, and the condition (True to continue the loop) is opposite the intuitive condition (True to exit the loop). -- Jeff Carter "Pray that there's intelligent life somewhere up in space, 'cause there's bugger all down here on earth." Monty Python's Meaning of Life 61