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, 25 Aug 2009, David Holland wrote:
> However, outside of that context, argument names, or at least some
> argument names, serve as a useful form of documentation. While the
> "vp" in "struct vnode *vp" doesn't add much value, writing "unsigned
> flags" instead of just "unsigned" is actually useful, and IMO it
> should be, if anything, encouraged.

You can put the argument name in a comment.  I sometimes use this style
in non-NetBSD code:

    int ioctl(int /* d */, unsigned long /* request */, void * /* argp */);

--apb (Alan Barrett)


Home | Main Index | Thread Index | Old Index