Re: argument names in function declarations
David Holland <[email protected]> Tue, 25 Aug 2009 04:35:24 +0000
| Newsgroups | gmane.os.netbsd.devel.general |
|---|---|
| Message-ID | <[email protected]> |
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 [email protected]