C style

Oleg Kiselev x258 oleg at birtch.UUCP
Wed Oct 2 14:15:57 AEST 1985


 Terry Poot writes in <3400010 at ndm20>
> 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, as there is no label to catch 
> your eye and alert you to the presence of the d*mned thing. The only way I will
> use a break is in a set of macros implementing a middle exit loop construct.
> We use LOOP...LOOPUNTIL...ENDLOOP. I know, adding features to a language with
> #define has problems, but at least that code is readable once you know what the
> constructs do, which is quite apparent. C should have that structure built in.
> Since it doesn't, we add it. The keywords are at the same indentation level, of
> course.
WHY??? What do you need LOOP...etc for when you have "do...while(...);" and 
"while (...) ...." ???? 
And about "break" : HOW do YOU get around "switch" statements ? or do you use
"if... then .... else if .... then ..........."? May be you even #defined that
to be IF, THEN, ELIF, FI like Bourne does? 

Go ahead, do what you feel like! But don't complain when the next time someone
refuses to *even look* at your stuff without cpp-ing it first!

														   Oleg Kiselev



More information about the Comp.lang.c mailing list