Skip to content

OBS008 deprecated-character-syntax ​

warning enabled by default

Old-style character length character*n / character*(*).

Why ​

The character*n form is obsolescent since Fortran 95. character(len=n) is the modern form and is consistent with every other kind and length parameter.

Reported ​

fortran
character*20 :: name

Preferred ​

fortran
character(len=20) :: name

Suppressing ​

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

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

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

Equivalent ​

Fortitude rule OB061 (see Lint Rules).