Intel® Fortran Compiler 16.0 User and Reference Guide

C_F_POINTER

Intrinsic Module Subroutine: Associates a pointer with the target of a C pointer and specifies its shape.

Module

USE, INTRINSIC :: ISO_C_BINDING

Syntax

CALL C_F_POINTER(cptr, fptr [,shape])

cptr

(Input) Is a scalar of derived type C_PTR. Its value is the C address of an interoperable data entity, or the result of a reference to function C_LOC with a noninteroperable argument. If the value of cptr is the C address of a Fortran variable, it must have the TARGET attribute.

fptr

(Output) Is a pointer. If it is an array, shape must be specified.

shape

(Optional, input) Must be of type integer and rank one. Its size equals the rank of fptr.

If the value of cptr is the C address of an interoperable data entity, fptr must be a pointer with type and type parameters interoperable with the type of the entity. In this case, fptr becomes pointer-associated with the target of cptr.

If fptr is an array, it has the shape specified by shape and each lower bound is 1.

If the value of cptr is the result of a reference to C_LOC with a noninteroperable argument x, the following rules apply:

See Also