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: a07f3367d7,45c6e2680274292d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.174.74 with SMTP id s10mr13587279qaz.1.1343186233204; Tue, 24 Jul 2012 20:17:13 -0700 (PDT) Received: by 10.66.77.1 with SMTP id o1mr710170paw.29.1343186233125; Tue, 24 Jul 2012 20:17:13 -0700 (PDT) MIME-Version: 1.0 Path: a15ni91751470qag.0!nntp.google.com!x2no404148qaj.0!news-out.google.com!b9ni52601738pbl.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!news.nctu.edu.tw!csnews.cs.nctu.edu.tw!news.cs.nctu.edu.tw!feeder.erje.net!newsfeed.x-privat.org!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Labeled exit within generalized labeled loop not allowed? Date: Thu, 19 Jul 2012 01:41:00 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <5003dffc$0$291$14726298@news.sunsite.dk> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1342680064 6771 69.95.181.76 (19 Jul 2012 06:41:04 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 19 Jul 2012 06:41:04 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-07-19T01:41:00-05:00 List-Id: "Niklas Holsti" wrote in message news:a6ie8cFfi4U1@mid.individual.net... ... > The conclusion is that I (as one example of an Ada programmer) usually > would not code an exit statement (whether labeled or unlabeled) in a > simple loop that uses the generalized loop syntax, because then the loop > would not process all the elements in the container. The AARM specifically suggests using an exit statement if you need to just handle part of a container. See A.18.2(230.a-c/3). That's the justification for why there is an iterator form that has a start location, but no iterator with a stop location. (Beyond the fact that there are problems if the stop location is not in the container.) So it is intended that such exits be used. I'd expect the need to be relatively rare, but certainly not non-existent. Randy.