Subject: Re: a new KNF (and some comments)
To: Martin Husemann <martin@rumolt.teuto.de>
From: Christian E. Hopps <chopps@merit.edu>
List: tech-kern
Date: 01/21/2000 11:56:57
"Martin Husemann" <martin@rumolt.teuto.de> writes:

> > /*
> >  * The function type must be declared on a line by itself
> >  * preceeding the function.
> >  */
> > static char *
> > function(int a1, int a2, float fl, int a4)
> 
> This doesn't allow inline documentation of the parameters either. Shouldn't
> 
> static char *
> function(
> 	int a1,	/* .... */
> 	int a2,	/* .... */
> 	float fl,	/* .... */
> 	int a4)	/* .... */
> 
> be an option?

Whats wrong with

/*
 * logn returns the log base `b' of the value `v'.
 */
static float
logn(int v, int b)
{
}

I've never felt that inline comments were that nice.  If you really
want to be verbose take that same line by line list and put it in the
comment.  I think they just clutter the code and obfuscate the function
type.

Thanks,
Chris.