Skip to content

PRT021 star-kind ​

warning enabled by default

A non-standard type*size declaration (real*8, integer*4).

Why ​

real*8 is a common extension, never part of the standard. Use a kind parameter: real(real64).

Reported ​

fortran
real*8 :: 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[PRT021] <why this occurrence is fine>

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

References ​

Sections of the shipped knowledge packs behind this rule:

  • hpc-practice:fortran-practice#forbidden-kind-violating-patterns (fobis kb show hpc-practice:fortran-practice#forbidden-kind-violating-patterns)

Equivalent ​

Fortitude rule PORT021 (see Lint Rules).