Clicky

Fortran Wiki
kind

Description

kind(x) returns the kind value of the entity x.

Standard

Fortran 95 and later

Class

Inquiry function

Syntax

k = kind(x)

Arguments

  • x - Shall be of type logical, integer, real, complex or character.

Return value

The return value is a scalar of type integer and of the default integer kind.

Example

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

category: intrinsics