Coding Standards. was: a style question

Peter da Silva peter at ficc.ferranti.com
Fri Dec 7 04:33:16 AEST 1990


In article <3072 at litchi.bbn.com> rsalz at bbn.com (Rich Salz) writes:
> In <L237B.5 at xds13.ferranti.com> peter at ficc.ferranti.com (Peter da Silva) writes:
> >My objection to beautifiers is what they do to stuff like this:
> 		'T',	ARGOPT,		argChar,	__ &TabChar,	"Tab",

> If you put the curly braces in then there would be no problem:
> 	{ 'T',    ARGOPT,         argChar,        __ &TabChar,    "Tab", }

Really? I run this code through Indent and I get:

	{
		'T', ARGOPT, argChar, __ & TabChar, "Tab",
	}

> Anyone who maintains the code after you will thank you for it.

Good point. I normally do, but in this case I was cribbing from the
parseargs sample code.

> The other problem is to not use the C pre-processor to change the syntax of
> the language, as __ and ENDOFARGS apparently do.

Complain to Eric Allman. I don't see this as such a heinious sin, myself,
if it significantly improves readability (as it does in this case).
-- 
Peter da Silva.   `-_-'
+1 713 274 5180.   'U`
peter at ferranti.com 



More information about the Comp.lang.c mailing list