Article View: comp.lang.misc
Article #5426Re: Loops
From: Joe Keane
Date: Sat, 02 Apr 1988 07:31
Date: Sat, 02 Apr 1988 07:31
22 lines
1332 bytes
1332 bytes
(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
Technical Details
Message-ID:
<AWJ9X4y00WAHE53kVi@andrew.cmu.edu>Path:
arc1-ca.pugleaf.net!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+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>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <AWJ9X4y00WAHE53kVi@andrew.cmu.edu> 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>