The KIND intrinsic function returns the kind type parameter value of X.
This is an enquiry function; X need not have a value, and indeed can even be an unallocated allocatable variable or a disassociated or undefined pointer.
In Fortran 2003, this enquiry may also be performed on a variable using the “%kind” formulation (and this can be done even if KIND is not available for use as an intrinsic function, for example, if it is the name of another local variable).