J3/00-122 Date: 2000/02/21 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:38] After "nondefault character" add ", other than character with the C character kind (16.1)," [353:40] Before ";" insert ", and that is different from the unspecified storage units of (x)" [[Editor: Please note that (x) here refers to the list item added by the next edit.]] [353:40+] Insert a new list item after (5), and renumber the items that follow: "(x) A nonpointer scalar object of type character with the C character kind of length occupies contiguous unspecified storage units;" [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' 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 "Futhermore, a Fortran entity of type character with a nonconstant length parameter or with a length parameter that is not equal to one does not interoperate with any C entity." [387:1-10] Delete J3 note 120