home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!caen!kuhub.cc.ukans.edu!spssig.spss.com!hosken
- Newsgroups: comp.lang.c++
- Subject: Re: GOTO, was: Tiny proposal for na
- Message-ID: <1992Aug26.194538.1598@spss.com>
- From: hosken@spss.com (Bill Hosken)
- Date: Wed, 26 Aug 1992 19:45:38 GMT
- Sender: news@spss.com (Net News Admin)
- References: <714668024@thor> <6800007@tisdec.tis.tandy.com> <1992Aug26.130335.26725@hemlock.cray.com>
- Organization: SPSS, Inc.
- Lines: 26
-
- >In article <1992Aug26.130335.26725@hemlock.cray.com>, dsf@cray.com (Dan Frankowski) writes:
- >> In article <6800007@tisdec.tis.tandy.com> kevinl@tisdec.tis.tandy.com writes:
- >>
- >> > For experienced programmers, the goto is a legitamite tactic.
- >> >There may not be any cases where a goto is absolutly necessary (I've
- >> >heard that there are some, but I have yet to see any), ..
- >>
- >> I thought that one of the triumphs of the Structured Programming camp
- >> was an honest-to-goodness proof that any code using gotos could be
- >> replaced by structured constructs and state variables. I can imagine
- >> some such proof by construction from arbitrary code with a goto.
- >>
-
- It is easy to get rid of goto statements. If you see goto a; just replace it by
- callGOTOa(); and then write a little subroutine that does the stuff at a:.
-
- Now this introduces a lot of "recursion" into the program but the result has
- no goto statements. The resulting program will be more difficult to read and
- probably blow the stack limits, but what the heck.
-
- Clear thinking helps to write good code, gotos whether or not.
-
-
- ___________________
-
- Standard disclaimer.
-