J3/06-140 Date: 16 February 2006 To: J3 From: Rob James Subject: C_SIZEOF specification, syntax, and edits References: 04-104, 04-344r1, J3-005 Detailed Specification: The C_SIZEOF function, defined in the ISO_C_BINDING intrinsic module, will return the size of its argument, as defined by the C sizeof operator. If the argument is an array, the intent is that C_SIZEOF should return the size of the array, not the size of an equivalent C pointer. Syntax: No new syntax. Edits: [125:41+] Add list item "(4++) the intrinsic module function C_SIZEOF," [395:31+++] (after Note 15.6) Add section 15.1.2.6 C_SIZEOF (X) Description. Returns the size of X in bytes, as defined by the C sizeof operator (Section 6.5.3.4 of the C International Standard). Class. Inquiry function. Arguments. X shall be an interoperable data entity that is not an assumed-size array. Result Characteristics. Scalar integer of kind C_SIZE_T (15.2.1). Result Value. If X is scalar, the result value is the value that the C processor returns as the result of applying the sizeof operator (Section 6.5.3.4 of the C International Standard) to an object of a type that interoperates with the type of X. If X is an array, the result value is the value that the C processor returns as the result of applying the sizeof operator to an object of a type that interoperates with the type of X, multiplied by the number of elements in X.