Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: Notesfiles $Revision: 1.7.0.8 $; site ccvaxa
Path: utzoo!watmath!clyde!cbosgd!ihnp4!inuxc!pur-ee!uiucdcs!ccvaxa!preece
From: preece@ccvaxa.UUCP
Newsgroups: net.lang.c
Subject: Re: I break for(;;) loops
Message-ID: <2600016@ccvaxa>
Date: Thu, 3-Oct-85 15:57:00 EDT
Article-I.D.: ccvaxa.2600016
Posted: Thu Oct  3 15:57:00 1985
Date-Received: Sat, 5-Oct-85 06:31:52 EDT
References: <1820@brl-tgr.ARPA>
Lines: 24
Nf-ID: #R:brl-tgr.ARPA:-182000:ccvaxa:2600016:000:1043
Nf-From: ccvaxa.UUCP!preece    Oct  3 14:57:00 1985


/* Terry Poot writes:
> Some of us feel the same about breaks as we do about gotos. I won't use
> it, or continue either, and I won't let anyone in my shop use it. It is
> just a goto with an implicit label, and destroys the ability to
> determine program flow from the FORM of the source even more
> drastically,...
----------
Well, it's nice to be able to infer meaning from form (we love you,
Mies), but break and continue are much clearer than the alternative
of bracketing off the remaining code within the loop.  If there's more
than one break in a loop any other method leads to horrible
structures that may explicitly expose the flow of the program but
are guaranteed to give the reader instant migraine.  I think you
should lay out your code so that the break is very obvious (separate
line, with comment), but you shouldn't avoid using them.

It is unfortunate that they used the same word for breaking from a
loop and terminating a case clause in a switch statement.

-- 
scott preece
gould/csd - urbana
ihnp4!uiucdcs!ccvaxa!preece