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: Simon Wright Newsgroups: comp.lang.ada Subject: Re: stopping a loop iteration without exiting it Date: Sun, 07 Jan 2018 11:45:42 +0000 Organization: A noiseless patient Spider Message-ID: References: <689a3bd0-c2fc-42ff-8c64-041a5045d8ac@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="b831e4f614b7c0c82606667c2a1d06f7"; logging-data="30580"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+2mVRa5PcXQioyoqQpqhJwb25+mDZ3PJA=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:fNd8E5EXHMTC0SUt25GWlmd9U3k= sha1:Xx77ovaA0jHnt1uwHEtAcjX/dYw= Xref: reader02.eternal-september.org comp.lang.ada:49800 Date: 2018-01-07T11:45:42+00:00 List-Id: Mehdi Saada <00120260a@gmail.com> writes: > If order is signifiant, how about putting the common part in a > procedure, and calling it after or before the specific part, in each > of the "whens" ? Of course, but it adds noise (the declaration of the procedure) and you might easily forget to put the call in on one of the branches (especially if added later).