[net.lang.c] braces

wapd (11/01/82)

	I favor the style :

func(args)
int args
{
int i

if (cond)
	{
	i=...
	j=...
	}
while (khk)
	{
	i=...
	k=...
	}
}

	and so on.  Everything at the same level is at the same
indentation, separation of control part (if, while, for, etc) and
body (from { to }) and so on.

	Just thought I'd add my 2 cents.
		
					Bill Dietrich
					houxj!wapd

thomas (11/03/82)

Apologies for the previous message, it got bit by the "." feature.  

I find the brace style

foo()
{
foo decls
statements
etc.
}

almost impossible to read.  You can't tell where the function begins or ends
without really looking hard at it.  If you're scanning a printout (a what?
You know, those paper listings), it takes a lot of effort to find a given
function.  I made some minor modifications to make recently, and I had to
run the whole source (which is written in the above style) through a 
prettyprinter before I could work on it at all.

=Spencer