Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!bbn!rochester!PT.CS.CMU.EDU!andrew.cmu.edu!jk3k+ From: jk3k+@andrew.cmu.edu (Joe Keane) Newsgroups: comp.lang.misc Subject: Re: Loops Message-ID: Date: 2 Apr 88 07:31:16 GMT References: <2827@enea.se> <1557@pasteur.Berkeley.Edu> <2773@mmintl.UUCP> <294@tmsoft.UUCP> <2488@bsu-cs.UUCP> <17911@watmath.waterloo.edu>, <2524@bsu-cs.UUCP> Organization: Carnegie Mellon University Lines: 20 In-Reply-To: <2524@bsu-cs.UUCP> (Childish flame alert?) You want to see contorted code? Look at someone trying to wrestle out of Pascal's loop constructs with boolean flags. At least with lots of goto's you've only to worry about one state: where you are in the program. With this code, you have to cross this with the possible combinations of flags. I want to call the style police when i see this (and don't even think about nested loops): done := false; while not done do begin do_some; if done_now then done := true else do_some_more; if done_already then done := true; { leaving out the else causes a mess } do_even_more end --Joe