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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public From: mfinney@lynchburg.net Subject: Re: Software landmines (loops) Date: 1998/09/17 Message-ID: #1/1 X-Deja-AN: 391956554 References: <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> <35ece7ee.1489912@news.erols.com> <905134925.147581@iris.nyx.net> <35f34bbd.7903825@news.erols.com> <35f44e7d.8607016@news.erols.com> <35F5C625.A99336AC@ist.flinders.edu.au> <35F70F41.67AC4347@earthlink.net> X-Complaints-To: Abuse Role , We Care X-Trace: newsread.com 906012576 208.229.14.124 (Thu, 17 Sep 1998 02:09:36 EDT) Organization: Lynchburg.net (lynchburg.net) Reply-To: mfinney@lynchburg.net NNTP-Posting-Date: Thu, 17 Sep 1998 02:09:36 EDT Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-09-17T00:00:00+00:00 List-Id: In , gio+van+no+ni+8@tal+star+spam.com (Giovanni 8) writes: >> Michael Lee Finney wrote: >> I have made a study of many control structures for years >> as a hobby and virtually all of them are tree-structured, >> but they are not structured. > >Virtually all of them are tree-structured but not structured? > >Virtually all of them are 4-wheeled vehicles but not wheeled >vehicles? > >Since tree-structures are a sub-set of all possible structures, >then they must be structures. You misunderstand. You are applying general analogy to the situation, but it is invalid because these terms have specific technical meanings. Code which is structured only allows a single entry, single exit with some possible argument as to exactly which control structures are valid. Traditionalists will argue, for example, that a mid-loop exit is not acceptable and others will disagree. Code which is tree-structured essentially allows any control structure which does not contain a jump into the middle of a block. Or, another way of expressing the concept, you may exit or repeat any block any number of times at any depth of block nesting. Neither structured code nor tree-structured code allows unrestricted use of the GOTO statement. Under these definitions, all structured code is tree-structured, but not vice- versa. Michael Lee Finney