The Ultimate Style of Braces

mab mab
Fri Oct 29 12:31:35 AEST 1982


    To date, no-one has posted what seems to me to be the obvious way
to handle braces; it's a style I think everybody (well, almost everybody)
can agree about.  And it does eliminate any controversy about braces.
The format? Well, at the left is a typical "if" statement; notice the
braces.  Replace it with the arrangement on the right:

	if (...) {                      if (!(...)) goto eoif;
		........                        ........
		........                        ........
		........                        ........
	}                               eoif:;

See? No braces, so no controversy. (To those die-hards who need to flame
about something, I guess we could have a debate on whether the "goto"
should be on the same line as the "if"... sigh.)

With tongue planted VERY firmly in cheek,
Matt
(mab at purdue, ...!{decvax|ucbvax}!pur-ee!purdue!mab



More information about the Comp.lang.c mailing list