Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autodoc inconsistency #53

Open
diegojco opened this issue Sep 12, 2023 · 0 comments
Open

Autodoc inconsistency #53

diegojco opened this issue Sep 12, 2023 · 0 comments

Comments

@diegojco
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant