[comp.unix.wizards] Re^2: Latest indent request

maart@cs.vu.nl (Maarten Litmaath) (12/06/88)

pokey@well.UUCP (Jef Poskanzer) writes:
\main ()
\	{
\	if (expr)
\		{
\		while (cond)
\			{
\			};
\		}
\	}

\This style is common among ex Pascal programmers.
                               ^^^^^^^^^^^^^^^^^^
Aha! Isn't the following one of the first lessons in C?

	C is NOT Pascal, so don't do things like `#define BEGIN {'.

On the other hand, DO apply the K&R indenting rules!
BTW, I didn't even use the indenting scheme above for Pascal!
-- 
fcntl(fd, F_SETFL, FNDELAY):          |Maarten Litmaath @ VU Amsterdam:
      let's go weepin' in the corner! |maart@cs.vu.nl, mcvax!botter!maart

maart@cs.vu.nl (Maarten Litmaath) (12/13/88)

dan@lclark.UUCP (Dan Revel) writes:

\In article <1748@solo3.cs.vu.nl> maart@cs.vu.nl (Maarten Litmaath) writes:
\:8    Thou shalt make thy  program's  purpose  and  structure
\:     clear  to  thy  fellow  man by using the One True Brace
\:     Style, even if thou likest it not, for  thy  creativity
\:     is  better  used  in  solving problems than in creating
\:     beautiful new impediments to understanding.

\OK, just what does the 'One True Brace Style' look like?  Is there
\a formal specification for OTBS?  And was it included in ANSI C?
\(No really, I'm serious, inquiring minds want to know!)

Sadly there's no formal specification, but every C programmer should take a
GOOD look at K&R's coding style; weren't K&R the inventors of C? Shouldn't
they know what C code should look like? I'm inclined to say: if you don't
like their style, you don't understand what C's all about...
To descend from the level of the gods (for a short while :-) I confess I also
didn't like the OTBS, *AT THE BEGINNING*! (My first language was Pascal.)
-- 
fcntl(fd, F_SETFL, FNDELAY):          |Maarten Litmaath @ VU Amsterdam:
      let's go weepin' in the corner! |maart@cs.vu.nl, mcvax!botter!maart