Intel® Fortran Compiler 18.0 Developer Guide and Reference
Intrinsic Module Inquiry function (Generic): Returns the C address of an argument.
USE, INTRINSIC :: ISO_C_BINDING
result = C_LOC(x)
x |
(Input) Is one of the following:
|
The result is a scalar of derived type C_PTR. The result value represents the C address of the argument.
The result is a value that can be used as an actual CPTR argument in a call to procedure C_F_POINTER where fptr has attributes that allow the pointer assignment fptr=>x. Such a call to C_F_POINTER has the effect of the pointer assignment fptr=>x.
If x is a scalar, the result is determined as if C_PTR were a derived type containing a scalar pointer component PX of the type and type parameters of x and the pointer assignment CPTR%PX=>x were executed.
If x is an array, the result is determined as if C_PTR were a derived type containing a scalar pointer component PX of the type and type parameters of x and the pointer assignment CPTR%PX to the first element of x were executed.