To: J3 J3/22-160r1 From: Yasuharu Hayashi & Malcolm Cohen Subject: Editorial Corrections for 22-007r1 Date: 2022-July-19 1. Introduction (A) There is a missing parenthesis in the example for the RANK clause. (Thanks to Jens Helmers for reporting this.) (B) In 15.5.2.3 Conditional argument correspondence, the sentence about "simply contiguous" in paragraph two would fit better together with the other sentences about the characteristics in paragraph four. (C) In 16.9.7 ACOSPI (X), there is a typo in the formula (ACOS), and the example is copied from ACOSD, so the result value is wrong. (E) In C.13.6.2 Mapping of interfaces with void * C parameters to Fortran, the name of the C routine in paragraph 7 does not match the interface in paragraph 5 (which it is supposed to be implementing). (F) The title of subclause C.13.9 is "Processing assumed-shape arrays in C" but the example shows the use of assumed-rank, not assumed-shape. Either the title should be changed, or the example should be changed to use assumed-shape, and the verbiage changed to reflect that. The editor thinks that the fact that the runtime errors are detectable at compile time, if INTEGER(C_int),DIMENSION(:,:) were used, at the very least warrants explanation that we're exampling runtime error detection. (G) Paragraph 1 of subclause C.13.9 says: "The example shown below calculates the product of individual elements of arrays A and B and returns the result in array C."; however, the example actually calculates the product of arrays B and C, returning the result in array A. (H) In C.13.11 Changing the attributes of an array, the last sentence of paragraph one says that it "constructs the second C descriptor by invoking CFI_section with the value CFI_attribute_other for the attribute parameter," but the example has no invocation of CFI_section, and CFI_section has no "attribute parameter". Obviously, "CFI_establish" is intended. 2. Edits to ISO/IEC JTC1/SC22/WG5/J3/22-007r1 (Draft Fortran 2023) [113:1-2] 8.5.17 RANK clause, NOTE 1, Change "X0)" -> "X0))". {Fix missing parenthesis.} [320:12-13] 15.5.2.3 Conditional argument correspondence, move the sentence "It is simply contiguous if and only if all of its consequent-args are simply contiguous." from the end of para 2 to the end of para 4. [360:12] 16.9.7 ACOSPI (X), paragraph 5 Result Value, 2nd sentence, Change "ACOS" to "ACOSPI", making the sentence read "It is expressed in half-revolutions and lies in the range 0 <= ACOSPI (X) <= 1." [360:13] Same subclause, paragrap 6 Example, Change "180.0" to "1.0", making the whole paragraph read "Example. ACOSPI (-1.0) has the value 1.0 (approximately)." [623:4] C.13.6.2 Mapping of interfaces with void * C parameters to Fortran, paragraph 7, Change "EXAMPLE_send_fortran" to "EG_send_fortran", making it "void EG_send_fortran(const CFI_cdesc_t *buffer..." {Editor: Adjust indentation of following line so that it looks nicer.} [624:34] C.13.9 Processing assumed-shape arrays in C, title, Change "Processing assumed-shape arrays in C" to "Processing assumed-rank in C". [624:35-36] Same subclause, paragraph 1, 1st sentence, Change "A and B and returns the result in array C" to "B and C and returns the result in array A". This makes the first sentence read "The example shown below calculates the product of individual elements of arrays B and C and returns the result in array A." [624:38+] Same subclause, after paragraph 1, insert new paragraph "This demonstrates runtime error detection even though the specific errors could have been detected at compile-time, if the interface declared the arrays as "INTEGER(C_INT),DIMENSION(:,:)")." [627:30] C.13.11 Changing the attributes of an array, paragraph 1, 3rd (last) sentence. After "invoking", change "CFI_section" to "CFI_establish". ===END===