Skip to content

MDN001 double-precision ​

warning opt-in

A double precision (or double complex) declaration.

Why ​

double precision fixes the precision in the type name: changing the working precision means editing every declaration. A named kind parameter (real(rk), with rk from iso_fortran_env or a project kind module) changes everywhere at once.

Reported ​

fortran
double precision :: x

Preferred ​

fortran
real(real64) :: x

Suppressing ​

For one occurrence, with the reason on the same line (or alone on the line before the statement):

fortran
! fobis: ignore[MDN001] <why this occurrence is fine>

For the whole project, ignore = MDN001 in the fobos [lint] section.

Equivalent ​

Fortitude rule MOD001 (see Lint Rules).