VACUMM / sphinx-fortran

Fortran domain and autodoc extensions to Sphinx
Other
45 stars 29 forks source link

Autodocumentation of parameters #52

Open diegojco opened 11 months ago

diegojco commented 11 months ago

I have a section in a module of my Fortran code where

    ...
    INTEGER, PARAMETER :: ps = 6 !Number of digits of a single precision float
    INTEGER, PARAMETER :: rs = 37 !Exponent range of a single precision float
    INTEGER, PARAMETER :: pd = 12 !Number of digits of a double precision float
    INTEGER, PARAMETER :: rd = 307 !Exponent range of a doble precision float

    INTEGER, PARAMETER :: sp = selected_real_kind(ps, rs) !Single precision float kind
    INTEGER, PARAMETER :: dp = selected_real_kind(pd, rd) !Double precision float kind
    INTEGER, PARAMETER :: qp = selected_real_kind(32) !Quadruple precision float kind
    INTEGER, PARAMETER :: wp = dp !Working precision float kind
    ...

When the autodocumentation is generated for this module, the description for qp is missing and dp is described as "Working precision float kind" as if the comment for wp corresponded to dp. Is there a workaround other than writing

    ...
    INTEGER, PARAMETER :: ps = 6 !Number of digits of a single precision float
    INTEGER, PARAMETER :: rs = 37 !Exponent range of a single precision float
    INTEGER, PARAMETER :: pd = 12 !Number of digits of a double precision float
    INTEGER, PARAMETER :: rd = 307 !Exponent range of a doble precision float

    INTEGER, PARAMETER :: sp = selected_real_kind(ps, rs) !Single precision float kind
    INTEGER, PARAMETER :: dp = selected_real_kind(pd, rd) !Double precision float kind
    INTEGER, PARAMETER :: qp & !Quadruple precision float kind
    & = selected_real_kind(32)
    INTEGER, PARAMETER :: wp & !Working precision float kind: ``dp``
    & = dp
    ...