对一组变量的评论

问题描述 投票:2回答:1

我试图使用doxygen 1.7.3在Fortran 90代码的文档中使用一组变量的注释:

!> The parameters defined to convert R to Q
real(wp),allocatable :: A(:)
integer,allocatable :: B(:)
integer,allocatable :: C(:)

但是,这只会产生第一个变量的注释。我怎么能对这三个人发表评论?

更新:正如@Alexander Vogt的回复一样:如果使用以下内容,结果看起来非常好:

!> @name groupname 
!! The parameters defined to convert R to Q
!> @{
real(wp),allocatable :: A(:)
integer,allocatable :: B(:)
integer,allocatable :: C(:)
!> @}
fortran doxygen fortran90
1个回答
1
投票

您可以使用@defgroup <name> <description> @{ ... @}对变量进行分组:

!> @defgroup groupname The parameters defined to convert R to Q
!> @{
real(wp),allocatable :: A(:)
integer,allocatable :: B(:)
integer,allocatable :: C(:)
!> @}

有关详细信息,请参阅the Doxygen manual。描述应该与您的评论非常接近。

请注意,您还可以向变量本身添加注释。


或者,您可以使用"Member groups"

!> @name groupname The parameters defined to convert R to Q
!> @{
real(wp),allocatable :: A(:)
integer,allocatable :: B(:)
integer,allocatable :: C(:)
!> @}
© www.soinside.com 2019 - 2024. All rights reserved.