break, continue, return, goto (net.religion.c)

BALDWIN mike at whuxl.UUCP
Tue Nov 12 16:16:32 AEST 1985


Abuses like in your example are precisely why break/return(s) have a
bad name to some people, I believe.

The crux of the matter seems to be the size of the function/loop.  If it
is small, a simple test is better.  If it is really big, splitting it into
functions is better.  It's that in-between state where breaks get their
say.  And, like everyone has their own curly style [WHAT! Not K&R! EAT RAW
NOODLES AND SPINACH!  oh sorry, this isn't net.religion.c :-)], everyone
has their own idea about the critical mass of program text (sometimes "code"
is exactly the right word!!) before it should be split up.

> 	Something in this flavor (this may be taking it a bit too far,
> 	but I like to push the real work down as far as possible...)

This is fun to do.  One of my programs goes so many layers deep that by
the time you get to the actual i/o, you've lost track of what you were
doing!  (It implements a layered network protocol, so please, no flames.
They shall be dutifully rot13'd and chanted backwards.)

That EMT Trap story was great!  Talk about startling!

> 	Oh well, enough religion.  That's what the C bible is for, right? :-)

Of course!  Since net.religion.christian posters sometimes include quotes
from a Bible, it seems only appropriate to sign off with one here.  Are
*you* a "floating type" yet?  Yayeh!

"Conversions of integral values to			Michael Baldwin
 floating type are well behaved."			{at&t}!whuxl!mike
	-- C Bible, Book 6, Chap 3, Verse 3



More information about the Comp.lang.c mailing list