home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!hpscdc!hplextra!otter.hpl.hp.com!hpltoad!cdollin!kers
- From: kers@hplb.hpl.hp.com (Chris Dollin)
- Newsgroups: comp.lang.c++
- Subject: Re: Re: GOTO, was: Tiny proposal for named loops.
- Message-ID: <KERS.92Aug27125606@cdollin.hpl.hp.com>
- Date: 27 Aug 92 11:56:06 GMT
- References: <714668024@thor> <6800007@tisdec.tis.tandy.com> <rmartin.714863091@thor> <2318@devnull.mpd.tandem.com>
- Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
- Organization: Hewlett-Packard Laboratories, Bristol, UK.
- Lines: 18
- In-Reply-To: rgp@mpd.tandem.com's message of 27 Aug 92 03:36:40 GMT
- Nntp-Posting-Host: cdollin.hpl.hp.com
-
- In article ... rgp@mpd.tandem.com (Ramon Pantin) writes:
-
- It is well known that to rewrite code that uses breaks, continues,
- mid-function returns and gotos (in the most general case) you have to
- either:
- - Add state variables to the head of loops and additional tests
- of these variables within the bodies of the loops; or
- - State variables only tested at the head of the loops and
- code duplication.
-
- Isn't one (non-boolean) state variable enough? [Hint: call it ``PC''. When you
- are enlightened, you will realise that just because it's *possible* to cast
- your code in an obsessively structured fashion doesn't mean you *should*.]
-
- --
-
- Regards, | ``Wandering minstrels are fogging my brain | Judy Tzuke
- Kers. | And weird intellectuals are doing the same.'' | Higher & Higher
-