Skip to content

Autodoc inconsistency #53

Open
Open
@diegojco

Description

@diegojco

In a module i have

    ...
    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
#ifdef __MIXED_PRECISION
    INTEGER, PARAMETER :: vp & !Mixed precision float kind: ``sp`` or ``dp`` (at compile time)
    & = sp !Single precision float kind
#else
    INTEGER, PARAMETER :: vp & !Mixed precision float kind: ``sp`` or ``dp`` (at compile time)
    & = dp !Double precision float kind
#endif

    INTEGER, PARAMETER :: pi1 = 2 !Number of digits of a 1-byte integer
    INTEGER, PARAMETER :: pi2 = 4 !Number of digits of a 2-byte integer
    INTEGER, PARAMETER :: pi4 = 9 !Number of digits of a 4-byte integer
    INTEGER, PARAMETER :: pi8 = 14 !Number of digits of a 8-byte integer

    INTEGER, PARAMETER :: i1 & !1-byte integer kind
    & = selected_int_kind(pi1)
    INTEGER, PARAMETER :: i2 & !2-byte integer kind
    & = selected_int_kind(pi2)
    INTEGER, PARAMETER :: i4 & !4-byte integer kind
    & = selected_int_kind(pi4)
    INTEGER, PARAMETER :: i8 & !8-byte integer kind
    & = selected_int_kind(pi8)

    INTEGER, PARAMETER :: wi & !Working integer kind: ``i4``
    & = i4 !4-byte integer kind

    PUBLIC :: sp, dp, wp, vp, i1, i2, i4, i8
    ...

where I needed to use the strategy of dividing all the declarations of parameters with line continuation so that the docstring for one parameter does not end up being the description of the parameter after the equal sign.

However, in the generated documentation the "default" values for vp, wi and wp result to be 4, 4 and 8, respectively. Why is that? Why not simply dp, i4 and dp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions