This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Refactor breakpoint_re_set_one


On Monday 28 March 2011 19:46:47, Joel Brobecker wrote:
> > +/* Find the SaL locations corresponding to the given addr_string.  */
> 
> By convention `addr_string' should be capitalized. 
> It's one of these things I really wonder why we do it, but anyways...

Wonder no more.  :-)

From <http://www.gnu.org/prep/standards/standards.html#Comments>,
5.2 Commenting Your Work:

 The comment on a function is much clearer if you use the argument names to
 speak about the argument values. The variable name itself should be lower case,
 but write it in upper case when you are speaking about the value rather
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 than the variable itself. Thus, "the inode number NODE_NUM" rather than "an inode".
 ^^^^^^^^^^^^^^^^^^^^^^^^

Thus, this is not restricted, or really specific of function arguments.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]