home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 12969 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  1.5 KB

  1. 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
  2. From: kers@hplb.hpl.hp.com (Chris Dollin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Re: GOTO, was: Tiny proposal for named loops.
  5. Message-ID: <KERS.92Aug27125606@cdollin.hpl.hp.com>
  6. Date: 27 Aug 92 11:56:06 GMT
  7. References: <714668024@thor> <6800007@tisdec.tis.tandy.com> <rmartin.714863091@thor> <2318@devnull.mpd.tandem.com>
  8. Sender: news@hplb.hpl.hp.com (Usenet News Administrator)
  9. Organization: Hewlett-Packard Laboratories, Bristol, UK.
  10. Lines: 18
  11. In-Reply-To: rgp@mpd.tandem.com's message of 27 Aug 92 03:36:40 GMT
  12. Nntp-Posting-Host: cdollin.hpl.hp.com
  13.  
  14. In article ... rgp@mpd.tandem.com (Ramon Pantin) writes:
  15.  
  16.    It is well known that to rewrite code that uses breaks, continues,
  17.    mid-function returns and gotos (in the most general case) you have to
  18.    either:
  19.        - Add state variables to the head of loops and additional tests
  20.          of these variables within the bodies of the loops; or
  21.        - State variables only tested at the head of the loops and
  22.          code duplication.
  23.  
  24. Isn't one (non-boolean) state variable enough? [Hint: call it ``PC''. When you
  25. are enlightened, you will realise that just because it's *possible* to cast
  26. your code in an obsessively structured fashion doesn't mean you *should*.]
  27.  
  28. --
  29.  
  30. Regards,    | ``Wandering minstrels are fogging my brain    | Judy Tzuke
  31. Kers.       | And weird intellectuals are doing the same.'' | Higher & Higher
  32.