LOGICAL intrinsic function
Standard: F77 F90 F95 F2003 F2008
Example Program

LOGICAL ( L [ , KIND ] )

L : Logical
KIND : scalar Integer constant expression;

Result : if KIND is present, Logical(Kind=KIND), otherwise Logical with default kind.


Converts a Logical value to default kind or a specified kind. Since there are only two valid values (.TRUE. and .FALSE.), the conversion is exact. This function can be used to pass a Logical value of one kind to a procedure whose dummy argument has a different kind.

Like many intrinsic functions, this is elemental; the result has the same shape as L, with the conversion being applied elementwise.