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,9127c759a41fcfda X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-05 15:26:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!kibo.news.demon.net!demon!shale.ftech.net!news.ftech.net!peernews.cix.co.uk!newspeer1-gui.server.ntli.net!ntli.net!newsfep3-gui.server.ntli.net.POSTED!53ab2750!not-for-mail From: "chris.danx" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020721 X-Accept-Language: en-gb, en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: [ot... well kindof] SDI References: <5ee5b646.0208040616.77f0460a@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Inktomi-Trace: pc3-bbrg1-2-cust234.ren.cable.ntl.com 1028586387 12107 80.5.140.234 (5 Aug 2002 22:26:27 GMT) Message-ID: Date: Mon, 05 Aug 2002 23:25:46 +0100 NNTP-Posting-Host: 80.3.128.4 X-Complaints-To: abuse@ntlworld.com X-Trace: newsfep3-gui.server.ntli.net 1028586387 80.3.128.4 (Mon, 05 Aug 2002 23:26:27 BST) NNTP-Posting-Date: Mon, 05 Aug 2002 23:26:27 BST Organization: ntl News Service Xref: archiver1.google.com comp.lang.ada:27729 Date: 2002-08-05T23:25:46+01:00 List-Id: Chad R. Meiners wrote: > "chris.danx" wrote in message >> >>My concern is at the line marked "-- ???" the code will just exit the >>begin-end block not the loop, is this correct? If so a simple revision >>that introduced a flag set after get_postcode would do. > > > Read the Ada Reference Manual Section 5.7 on Exit Statements. > When in doubt look up the rules of the language ;) or label your loop. > For instance you will find the following nice example in the above section > which I think you'll agree is quite helpful in expressing you intentions > clearly. I didn't understand that section in the RM exactly so I tried a little snippet to see what would happen. If the code looks something like this it works. loop begin some_statement (some_parameters); exit when True; exception when Some_Exception => Put_Line ("bad input"); end; end loop; What about flabby coding? Can I ask how to tidy that up here? I have one snippets of Ada code, which is flabby and need to tidy it up, but am not sure exactly why it is flabby (actually I now think I know why it is flabby, just not how to make it tighter). Thanks Chad, Chris -- to reply change 'spamoff' to 'chris'