Dear Franz,

The thought behind the question is quite intriguing, I've been
thinking about how to make it clear that a routine uses global
variables. I don't think one should miss use the @param for this as
@param is meant for  parameters/ arguments of the routine.
I don't think functionality you would like to have exists.

One solution would be that the user can specify by means of a
statement similar to the @param statement (e.g. @global) the variables
that are used by the routine and these variables would be listed in a
separate section and could be liked to the definition of the
variables. This is of course error prone as the developer has to
maintain the list.
Another possibility would be to have Doxygen parse the routine and see
which variables are not arguments or local variables and create a list
of these. This method also has some disadvantages, a.o. when a user
includes a files with some standard definitions for variables
(unfortunately this exists) or in languages like Fortran where it is
not mandatory to declare all variables let alone languages like
Python.

Just some of my thoughts

Albert

On Thu, Feb 21, 2013 at 4:22 PM,  <franz.holle...@emerson.com> wrote:
> Hi,
>
> I use the \param together with "::" to document the use of global variables 
> within a function. This works fine, but I get a warning about "@param is not 
> found in the argument list...". Can I turn off the warning for the case the 
> parameter is not in the functions parameter list, but is a global variable?
>
> Example:
>
> /**
>  * Lookup table for CRC calculation.
>  */
> static uint8_t crc_table[] = {
> ...
> };
>
> /**
>  * Calculates CRC.
>  *
>  * \param[in] data Points to data for which to calculate the CRC.
>  * \param[in] len  Number of bytes.
>  * \param[in] ::crc_table
>  */
> uint16_t CalcCRC(uint8_t *data, size_t len)
> {
>     ...
> }
>
> Doxygen does exactly what I want. The global variable crc_table is listed as 
> input parameter within the documentation for the CalcCRC() function and it 
> also gives a link to the global variable itself.
>
> That's pretty fine. The only unpleasant fact is the warning itself. Is there 
> a way to prevent this warning without turning it off generally?
>
> BTW: I use doxygen 1.7.4.
>
> Thanks & Best regards,
>
> Franz Hollerer
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Doxygen-users mailing list
> Doxygen-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/doxygen-users

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users

Reply via email to