1
votes

I am trying to write documentation for a fortran model using Doxygen. Some variables are defined in a specific module and then used in many other different modules using the use statement. That is I may have a f90 with the first module

module my_first_module

contains

subroutine my_first_subroutine (foo, bar)

use my_second_module     , only : param


... DO STUFF ...

end subroutine my_first_subroutine
end module my_first_module

and then a second f90 with the second module

module my_second_module

real(kind=8), parameter :: param = 1.

end module my_second_module

My question is can I produce a Doxy documentation that allow me to comment the variable param where I have defined it and that is inherited by the calling functions or subroutines.

The goal is to have the param descriptor comment in the html page that contains the documentation of my_first_module.

1

1 Answers

0
votes

The use my_second_module, only : param and the actual usage of param in the function my_first_subroutine of my_first_module module will automatically create a link to the source code that defines param.

If you want an explicit link to the doc of the variable param, you can add something like @see my_second_module::param in the documentation of my_first_subroutine. This will create an actual link to the doc of your variable.