J3/00-122r2 Date: 2000/03/02 To: J3 From: Henry Zongaro Subject: Edits for issues 149 and 120 (Interop.) References: 00-007, 00-011 Unresolved issue 149 [259:18-21] is a place holder to allow sequence assocation that involves a change in character length for characters of kind C_CHAR. Currently, sequence association involving a change in character length is only permitted for characters of default kind, and C_CHAR isn't necessarily the same as the default kind. To remedy this, we'll specify that characters of kind C_CHAR occupy contiguous unspecified storage units and generalize the description of sequence association involving characters. Edits to 00-007 --------------- [259:14] After "of type default character" add ", of type character with the C character kind (16.1)," [259:18-21] Delete J3 note 149. [261:7] Change "or a scalar of type default character" to "a scalar of type default character, or a scalar of type character with the C character kind (16.1)" [261:11] After "default character" add "or of type character with the C character kind," [261:12] Change "character storage units" to "storage units" [261:14] Change "character storage units" to "storage units" [261:15] Change "character storage units" to "storage units" [261:17] After "default character" add "or of type character with the C character kind," [261:18] Change "character storage units" to "storage units" [353:33-34] Delete item (3). (It's implied by item (4)). [353:36] Change "character storage units" to "<>" [353:41-43] Move item (6) before [353:37], and renumber it as (5). [353:37-40] Replace the current item (5) with the following two items, and renumber the remaining items. "(6) A nonpointer scalar object of type character with the C character kind (16.1) and character length occupies contiguous <>; (7) A nonpointer scalar object of any type not specified in items (1)-(6) occupies a single unspecified storage unit that is different for each case and each set of type parameter values, and that is different from the unspecified storage units of item (6);" [386:6] Add a new sentence "The value of C_CHAR is known as the <>." [386:38+] Add new paragraph to Note 16.3 "For example, given a C function with a prototype like the following void copy(char in[], char out[]); it can be declared and used in a Fortran program as follows. USE ISO_C_BINDING INTERFACE BIND(C) SUBROUTINE COPY(IN, OUT) USE ISO_C_BINDING CHARACTER(KIND=C_CHAR), DIMENSION(*) :: IN, OUT END SUBROUTINE COPY END INTERFACE CHARACTER(LEN=10, KIND=C_CHAR) :: & & DIGIT_STRING = C_CHAR_'123456789' // C_NULL_CHAR CHARACTER(KIND=C_CHAR) :: DIGIT_ARR(10) CALL COPY(DIGIT_STRING, DIGIT_ARR) PRINT '(1X, A1)', DIGIT_ARR END" ------------------------------------------------------------------------ Unresolved issue 120 [387:1-10] points out that there is no restriction on the length parameter of a character dummy that prevents it from being assumed. Edits to 00-007 --------------- [386:29-30] Replace the sentence that begins "In the case of character type, . . . ." with "Furthermore, a Fortran entity of type character does not interoperate with any C entity unless its length is omitted or is specified by an expression that is an initialization expression whose value is one." [387:1-10] Delete J3 note 120