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: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public X-Google-Thread: fac41,9a0ff0bffdf63657 X-Google-Attributes: gidfac41,public From: "Rick Smith" Subject: Re: Software landmines (loops) Date: 1998/09/02 Message-ID: #1/1 X-Deja-AN: 387106498 References: <6r9f8h$jtm$1@nnrp1.dejanews.com> <6renh8$ga7$1@nnrp1.dejanews.com> <6rf59b$2ud$1@nnrp1.dejanews.com> <6rfra4$rul$1@nnrp1.dejanews.com> <35DBDD24.D003404D@calfp.co.uk> <6sbuod$fra$1@hirame.wwa.com> <35f51e53.48044143@ <904556531.666222@miso.it.uq.edu.au> <6sgror$je8$3@news.indigo.ie> <6sh3qn$9p2$1@hirame.wwa.com> <6simjo$jnh$1@hirame.wwa.com> <35eeea9b.2174586@news.erols.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 X-Trace: news1.atlantic.net 904738549 207.30.140.134 (Wed, 02 Sep 1998 08:15:49 EDT) NNTP-Posting-Date: Wed, 02 Sep 1998 08:15:49 EDT Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-09-02T00:00:00+00:00 List-Id: Ell wrote in message <35eeea9b.2174586@news.erols.com>... >On Wed, 2 Sep 1998 00:44:08 -0500, "Robert Martin" >wrote: > > >>In any case, I note that in this thread nearly every article that advocates >>multiple exits evokes either readability, complexity, or naturalness as the >>justification. I contend that these are highly subjective things, > >This may be true, though I don't thinks so, but adherence to the dogma >you made up about "single entry and single exit" doesn't make things >clearer as most see it in this case. > >>Finally, I contend that the factors in favor of using a >>single-entry/single-exit style are, on the other hand, quite concrete and >>demonstrable. It has been shown that adhering to a structured style > >You have not shown at all that "single entry, single exit" is a >general coding maxim of structured programming. > Edward Yourdon, "Techniques of Program Structure and Design", Prentice-Hall, 1975, pg 145. "In order to test the entire program, it is important to be able to define the behavior of submodules at the k-th level independently of the context in which they occur. This allows us to prove the correctness of the submodules at the (k + 1)th level independent of their context in the k-th step. This in turn strongly suggests that each submodule should be designed with a single entry point and a single exit; in turn, the entire program can be described as a set of nested modules, each of which has one entry and one exit." -----------, pg 148. "The theoretical basis of structured programming lends itself to implementation in many of the current programming languages. The rules are quite simple: All processing in the program must consist of straight-line statements (e.g., ordinary computational statements) or one of the following three control statements: " 1. Procedure calls, subroutine calls, function invocation -- any legal call to a closed subroutine with one entry and one exit. ... " 2. IF-THEN-ELSE statements nested to any depth. " 3. Some looping constructs. ..." ------------------------------- Rick Smith e-mail: < ricksmith@aiservices.com >