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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,9a0ff0bffdf63657 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public From: behrends@cse.msu.edu (Reimer Behrends) Subject: Re: Software landmines (loops) Date: 1998/10/05 Message-ID: #1/1 X-Deja-AN: 397817820 References: <6qfhri$gs7$1@nnrp1.dejanews.com> <6sfcft$70p$1@hirame.wwa.com> <1dg8p3r.vfredh1aou58iN@n207167116191.inetworld.net> <6v2nr9$t8l$1@hirame.wwa.com> <1dgane6.16owv2g7g8ov8N@u2n207167116151.inetworld.net> <1dge7py.7401x8z7ne24N@u2n207167116162.inetworld.net> Organization: Michigan State University Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-10-05T00:00:00+00:00 List-Id: Charles H. Sampson (claveman@inetworld.net) wrote: > Reimer Behrends wrote: [Mid-exit loops.] > > You may notice, however, that the loop _body_ has two different exits > > for a mid-exit loop. > > I don't know about others, but I don't notice any such thing. Here > is a cut down version of the loop we were discussing. > > loop > > exit > > end loop > > Please point out the two exits (neither nor > has one) or give the definition of that you're using. The loop body is of course the following part of the code: exit It has an exit at the "exit" statement, and one at the end of , where control flow leaves the body to reenter at the top. And I'm not kidding you. Try to put the loop body into a procedure of its own, and this becomes very visible. (Ease of procedural decomposition is usually one of the benefits of strict single-entry, single-exit structures.) Reimer Behrends