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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fba93c19bb4e7dbd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-11 18:41:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-pas-nf2!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3F0F6742.8000405@spam.com> From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Q: Endless loop by dispatching References: <3F0ED2C8.6080409@snafu.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 12 Jul 2003 01:41:47 GMT NNTP-Posting-Host: 63.184.104.77 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1057974107 63.184.104.77 (Fri, 11 Jul 2003 18:41:47 PDT) NNTP-Posting-Date: Fri, 11 Jul 2003 18:41:47 PDT Xref: archiver1.google.com comp.lang.ada:40218 Date: 2003-07-12T01:41:47+00:00 List-Id: Michael Erdmann wrote: > > a := next(Attributes(This'Tag)) > while a /= null loop > Write( this.all, a.id ); > a := next(....); > end loop; When you're in the habit of using "while" loops, you often write code like this. When you avoid them, you tend to write loop A := Next (Attributes (This'Tag) ); exit when a = null; Write (This.all, A.ID); end loop; which avoids the often dangerous code duplication required by using "while". -- Jeff Carter "I blow my nose on you." Monty Python & the Holy Grail