C code formats (was: Latest indent request)

Maarten Litmaath maart at cs.vu.nl
Tue Dec 6 06:11:39 AEST 1988


gwyn at smoke.BRL.MIL (Doug Gwyn ) writes:

\In article <1748 at solo3.cs.vu.nl> maart at cs.vu.nl (Maarten Litmaath) writes:
\>gaspar at almsa-1.arpa (Al Gaspar) writes:
\>\	if (test)
\>\		{
\>\		whatever;
\>\		}
\>What a DISGUSTING format!

\Most programmers I know that have tried vertical alignment of braces
\for a while have come to prefer that to the style in K&R.  With "sam"
\the K&R style becomes acceptable because it is easy to find the
\matching brace.  In any case, when modifying existing code we use the
\same style as in the existing code, whatever it may be (unless the
\code is totally misformatted, in which case we beautify it first).

Right.

\>I've included Henry Spencer's `Ten Commandments for C Programmers';
\>special attention to point 8, please.

\Henry is a nice enough guy, but he's not God (in fact the first
                                 ^^^^^^^^^^^^
\attribute probably precules the second).

What!? Thank you very much! You've just managed to destroy my world! :-)
Seriously, I think Henry has marked a few things, that a lot of experienced
C programmers value a lot. They're not just his personal views.
-- 
fcntl(fd, F_SETFL, FNDELAY):          |Maarten Litmaath @ VU Amsterdam:
      let's go weepin' in the corner! |maart at cs.vu.nl, mcvax!botter!maart



More information about the Comp.unix.wizards mailing list