kind(x)
returns the kind value of the entity x
.
Fortran 95 and later
k = kind(x)
x
- Shall be of type logical
, integer
, real
, complex
or character
.The return value is a scalar of type integer
and of the default integer kind.
program test_kind
integer,parameter :: kc = kind(' ')
integer,parameter :: kl = kind(.true.)
print *, "The default character kind is ", kc
print *, "The default logical kind is ", kl
end program test_kind