Visible to Intel only — GUID: GUID-FABEACAA-44ED-476A-87AB-449F165764BA
Visible to Intel only — GUID: GUID-FABEACAA-44ED-476A-87AB-449F165764BA
C_SIZEOF
Intrinsic Module Inquiry function (Generic): Returns the number of bytes of storage used by the argument. It cannot be passed as an actual argument.
Module
USE, INTRINSIC :: ISO_C_BINDING
Syntax
result = C_SIZEOF(x)
x |
(Input) Is an interoperable data entity of any type and any rank. It must not be an assumed-size array or an assumed-rank array associated with an assumed-size array. |
Results
The result is a scalar of type INTEGER(8). If x is scalar, the result value is the size of x in bytes. If x is an array, the result value is the size of a single element of x multiplied by the number of elements in x.
Example
Consider the following:
INTEGER(4) :: S
INTEGER(4) :: T(3)
C_SIZEOF(S) ! has the value 4
C_SIZEOF(T) ! has the value 12