J3/00-261 To: J3 From: John Reid Date: 23-August-2000 Subject: Draft edits to J3/00-007r2 from WG5 Reference: J3/00-240 WG5 offers J3 the following suggested edits to J3/00-007r2. They are reproduced from ISO/IEC JTC1/SC22/WG5 papers N1405 and N1408. Note: <> means italics, <<>> means bold face, {} means obsolescent font, and [] encloses page and line numbers that refer to J3/00-007r2. [xv:39] "durring" => "during". [7:9] Replace "1993" by "2000" [32:34] The syntax rule number should be R401, not R314. [41:17] Replace "neither" by "not". [41:18-19] Delete "nor ... ". Covered by [342:4, 13-15] [43:22+] "Constraint: If => appears, the double-colon separator shall appear." [55:11] "structure constructor" should be in the index. [61:35] The X is not defined in this note, or a nearby previous one. Before this line insert: "X = (/ 3.2, 4.01, 6.5 /)". [63:20-21] "Constraint: In a , every that corresponds to a nonkind type parameter shall be a , a colon, or an asterisk, and every that corresponds to a kind type parameter shall be an ." [68:2+] The syntactic elements of what is at [68:11-34] should be constraints: "Constraint: A of * may be used only in the following ways: (1) To declare a dummy argument, (2) to declare a , (3) to declare a named constant, (4) in the of an ALLOCATE statement wherein each is a dummy argument of type CHARACTER with an assumed character length, or (5) {in an external function, to declare the character length parameter of the function result.} "Constraint: {The length specified for a character-valued statement function or statement function dummy argument of type character shall be an }. [68:11-34] Replace "A character length ... initialization expression" by: "A of * has the following meanings: (1) If used to declare a dummy argument of a procedure, the dummy argument assumes the length of the associated actual argument. (2) If used to declare a , the processor determines the length. (3) If used to declare a named constant, the length is that of the constant value (4) If used as the of an ALLOCATE statement, each assumes its length from the corresponding actual argument. (5) {If used to declare the character length parameter of the function result, any scoping unit invoking the function shall declare the function name with a character length parameter value other than * or access such a definition by host or use association. When the function is invoked, the length of the result variable in the function is assumed from the value of this type parameter.} [78:4] Change "attrribute" to "attribute". [103:7] Add ", " after "" [103:34] Delete "as if". [107:36] Change "components" to "subobjects". [115:34] Change title to "Characteristics of the result of NULL()" [115:42] After "" insert "for which no is specified". Before "type-bound" insert "interface of the". [115:43+] Add a new line of the table: "in a for which the interface specified by a is specified the . [118:2-3,10] The assertion that there is a problem with recursive specification functions, that cannot be surmounted by correct programming, is incorrect. Delete "and is not ... keyword" at [118:2-3] and all of [118:10-14]. [132:21] Replace "Where"-statement by a note: "R601 defines and R722 defines ." Compare to [42:46]. [134:42,44] The paragraph doesn't work for polymorphic allocatable components. At [134:42] replace "same type parameters" by "same dynamic type and type parameters as ". At [134:44] after "assignment" add "for objects whose declared type and type parameters are the same as the dynamic type and type parameters of the component of the ". [136:28-29] Delete because whether a result is polymorphic is a characteristic. [137:36] Change "BESEL" to "BESSEL". [155:8,11,13,14,22] Replace dots by underscores. [156:18] Remove punctuation (quote and dot) at the end of the line. [183:4-12, 36+] The note is confusing in that part of it refers to text yet to come at [183:34-36], and repetitive in that it restates part of that paragraph. At [183:8-12] delete "A derived type... representation" and insert a new note at [183:36+]: "This is because a pointer or allocatable component has no processor- independent representation". [238:1-4] Everything in 11.1.2 is stated elsewhere, usually as a constraint. Delete 11.1.2. [244:18] After "attributes" insert ", whether it is polymorphic". [244:28-29] After "rank" insert ", whether it is polymorphic", delete "and" after "pointer", insert ", and if it is a pointer whather it is a procedure pointer". [245:28-38] Replace by (2) The procedure has a dummy argument that (a) has the ALLOCATABLE, ASYNCHRONOUS, OPTIONAL, POINTER, TARGET, VALUE, or VOLATILE attribute, (b) is an assumed-shape array, (c) is a parameterized derived type, or (d) is polymorphic, (3) The procedure has a result that (a) is array-valued, (b) is a pointer or is allocatable, or (c) has a {nonassumed} type parameter that is not an initialization expression, or (4) The procedure is elemental, (5) The procedure has the BIND(C) attribute. [246:22+] Insert Contraint: If the is INTERFACE PROCEDURE(), the in the or the in the shall not be the same as a dummy argument of a procedure containing the interface block. [247:13, 15-16] The "otherwise part" is not true for abstract interface blocks, unless the preceding sentence still applies. At [247:13] insert "such" before "an" to refer to the preceding sentence. [330:34] Replace "1993" by "2000" [401:5+] "<> (9.5.2) A scalar object resulting from expanding an input/output list item according to the rules in (9.5.2)." [250:4-5] Point out in a comment that because argument B1 has assumed shape and argument B2 does not, a non-contiguous array section can be the actual argument associated with B1 without causing additional performance problems, but that if a non-contiguous array section is the actual argument associated with B2, a copy operation may be necessary. [259:16] R1201 is the wrong syntax rule number. Should be R1219. [261:10-11] Change "unless...procedure" to: "unless an array of the same rank that is not an unallocated allocatable array and not a disassociated pointer is supplied as an actual argument associated with a nonoptional dummy argument of that elemental procedure." [324:1] Change "pointer" to "pointer or procedure pointer". [343:34-37] Change "dummy...;" to "dummy argument that corresponds by position in the argument list to a nonoptional dummy argument in the other that is type- incompatible, has a different kind type parameter or a different rank, or for which there is no corresponding argument; and" [343:38-40] Change "dummy...rank." to "dummy argument that corresponds by argument keyword in the argument list to a nonoptional dummy argument in the other that is type-incompatible, has a different kind type parameter or a different rank, or for which there is no corresponding argument." Reason: To avoid confusion with arguments being present in the sense of the PRESENT intrinsic function or simply being declared and to avoid "correspondence" between items that are NOT corresponding (one argument list may, for example be shorter than the other). [344:35] Delete line. Reason: not needed because of [344:40] (as changed immediately below) and new wording in 5.1.2.10 that specifies that an interface confers the EXTERNAL attribute. [344:40] Change line to "(d) if there is an explicit specification of the EXTERNAL attribute (5.2.1.10) in that scoping unit". [345:4,9] The term "consistent" is used. This should be defined more precisely in terms of characteristics of dummy and actual arguments. [345:4-14] These paragraphs do not explicitly apply to defined operations, defined assignments, or user-defined input/output. They apply indirectly to defined operations by way of the phrase "it is generic in exact analogy to generic procedure names" at [250:15], but there is no parallel statement for defined assignment or user-defined derived-type input/output. Suggestion: For J3 for consideration. [345:7] Change "that interface block" to "the interface block". [345:13] Change "that interface block" to "the interface block". [400:25] Needs to refer also to 12.3.2.1.2. [400:27] Needs to refer also to 12.3.2.1.1. [402:10+] <> needs to be in the glossary. [404:22+] <> needs to be in the glossary. [459:1+] This is very probably an unnecessary remark, but we have noticed that some BNF definitions and keywords are missing in the index, such as ( IS in the index) <> It is very helpful to the reader to have all the BNF terms and keywords in the index. [468] It is surely an error that the index location for "type specifier" is 67-??