At 12:25 PM 9/8/2015 -0400, you wrote:
On Fri, Sep 4, 2015 at 11:53 AM,
<<mailto:doxygen-users-requ...@lists.sourceforge.net>doxygen-users-requ...@lists.sourceforge.net>
wrote:
Date: Fri, 4 Sep 2015 09:00:14 +0100
From: Frank Peelo <<mailto:f...@eircom.net>f...@eircom.net>
Subject: Re: [Doxygen-users] Another question....
So Doxygen
*should* use the names in the prototype, instead of the ones in the .c
file.
I would expect Doxygen to use the parameter names I document. That is, if
I put my Doxygen "mark up" on the function definition, I would expect it
to use the parameter names in the function definition. If I put my Doxygen
"mark up" on the prototype, I would expect it to use the parameter names
in the prototype.
and if you are running it on one without documents for the first time? It
*should* use the one in the function, because names are optional in the
prototypes.
Here is some documentation that would argue strongly for use of the
function, rather than the prototype.
The ANSI Solution
The ANSI standard's solution to the problems of mismatched arguments is to
permit the function declaration to declare the variable types, too. The
result is a function prototype—a declaration that states the return type,
the number of arguments, and the types of those arguments. To indicate that
imax() requires two int arguments, you can declare it with either of the
following prototypes:
int imax(int, int);
int imax(int a, int b);
The first form uses a comma-separated list of types. The second adds
variable names to the types. Remember that the variable names are dummy
names and don't have to match the names used in the function definition.
With this information at hand, the compiler can check to see whether the
function call matches the prototype. Are there the right number of
arguments? Are they the correct type? If there is a type mismatch and if
both types are numbers, the compiler converts the values of the actual
arguments to the same type as the formal arguments. For example, imax(3.0,
5.0) becomes imax(3, 5). We've modified Listing 9.4 to use a function
prototype. The result is shown in Listing 9.5.
On the other hand, I have not encountered this issue as the coding
standards my team and I work under require the prototypes to exactly match
the definitions.
------------------------------------------------------------------------------
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users
------------------------------------------------------------------------------
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users