tech-misc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: argument names in function declarations



On Tue, Aug 25, 2009 at 02:26:17PM +1000, Luke Mewburn wrote:
 > | Is this a good/bad idea? Should I propose specific text for
 > | share/misc/style?
 > 
 > I name prototype arguments where appropriate, for similar reasons
 > to your example of "unsigned flags".  I've used a variety of
 > naming conventions, depending upon the local conventions.
 > Sometimes knowing whether an argument is an "in" versus "out"
 > versus "both" can be useful, although you can usually infer that
 > a variable is input-only if it has const.

Right.

 > Does using leading underscores in the names help with the cpp issue?

It should, but it's also ugly enough that it might be better to skip
it, or use comments instead (e.g. "unsigned /*flags*/").

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index