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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: stopping a loop iteration without exiting it Date: Fri, 5 Jan 2018 14:17:10 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <81971548-23c9-4927-a6a8-6f0f1dba896b@googlegroups.com> <867esx70lw.fsf@gaheris.avalon.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 5 Jan 2018 13:17:10 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="f5d98908cdce36eccd1e824541905cc9"; logging-data="25933"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193Y48L3Ba1TYFMgrdRpm4HdraVM/dxEdI=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 In-Reply-To: <867esx70lw.fsf@gaheris.avalon.lan> Content-Language: en-US Cancel-Lock: sha1:SVJGr5iTJhu77MFbWF9wITvRxZI= Xref: reader02.eternal-september.org comp.lang.ada:49765 Date: 2018-01-05T14:17:10+01:00 List-Id: On 01/04/2018 10:52 PM, Mart van de Wege wrote: > "Jeffrey R. Carter" writes: >> >> I have never seen a real-world situation in which a "continue" was >> needed. > > It's a common idiom in Perl when looping over a stream of discrete items > (like lines in a file). A test at the top of the loop for cases where > processing is not necessary in the form of > > next if I hardly think Perl is a good example for Ada language design decisions. This appears to be exactly an example that can be replaced by an if statement, anyway. -- Jeff Carter "Brave Sir Robin ran away." Monty Python and the Holy Grail 59