To: J3 Members J3/17-113 From: Van Snyder Subject: Comments on Clause 15 References: 17-007 Date: 2017 February 01 1. Edits ======== [302:17,30 15.3.2.2p1,15.3.3p1] In 15.4.1p1, "(if any)" does not appear after "dummy arguments". It ought not to be needed here after "type parameters" (or it ought to be necessary in 15.4.1p1). Delete "(if any)" twice. [302:28 15.3.2.4p1] According to 15.3.2.1p1, an asterisk as a dummy argument has the characteristic that it is an alternate return indicator. Insert "additional" before "characteristics" so as not to contradict 15.3.2.1p1. [305:5 C1505] C1501 uses "for a procedure" not "of a procedure" For consistency, replace "of a procedure" with "for a procedure". [306:18-19 15.4.3.4.1p2] Replace "type and type parameters" with "type, type parameters, and rank". Otherwise, the second and fourth list items in 15.4.3.4.5p3 cannot work. [306:20 15.4.3.4.1p3] Replace "interface block" with "generic interface" because otherwise the GENERIC statement doesn't specify a generic identifier. [308:0+7 NOTE 15.7] Replace "function call" with "function reference" because a function isn't a subroutine. [308:12 15.4.3.4.3p2] Replace "enclosed in parentheses" with ", enclosed in parentheses if the second dummy argument does not have the VALUE attribute," so as not to appear to require processors to make two copies. Replace "second argument" with "second actual argument". [309:0+3 NOTE 15.9] Replace "if it given" with "if it is given" or "if it has". [309:6 15.4.3.4.5p1] Replace "from a module" with "by use association" so as not to cover the case of host association from a parent module into a submodule. [309:7+3 NOTE 15.10] Replace "interface blocks" with "generic identifiers specified by interface blocks or GENERIC statements". [309:14 15.4.3.5.6p3(3)] Replace "one has" with "one is a data object that has" and replace "other has" with "other is a data object that has" because a dummy function's result might have the ALLOCATABLE or POINTER attribute, and a dummy argument might be a procedure pointer. [311:14-26 C1515-C1521] Sort according to the referenced syntax rule. [311:40-312:9 15.4.3.6p6-10] Starting with "it specifies the initial..." at [311:40], make the remainder of 15.4.3.6p6 and each of 15.4.3.6p7-10 list items subsidiary to "If => appears in a in a ". [313:21 C1529] So as not to require the user to prove a theorem involving material in Clause 7, replace "have" with "be an elemental procedure that has". [315:0+8 NOTE 15.17] Replace "call" with "reference" or "invoke". [315:0+19 last line of NOET 15.17] Replace "MY_INTEGRATION called from INTEGRATE" with "INTEGRATE referenced [invoked?] from MY_INTEGRATION" because MY_INTEGRATION isn't referenced by INTEGERATE; it's the other way around. [316:11-12 15.5.2.3p2(2)] Is the "declared type part" the declared type part of the dummy argument or the actual argument? Replace "the declared type part of that target" with "the part of that target that has the same declared type as the dummy argument". [316:16-17 15.5.2.3p3(2)] Is the "declared type part" the declared type part of the dummy argument or the actual argument? Replace "the declared type part of that target" with "the part of that actual argument that has the same declared type as the dummy argument". [317:0+7 second line of NOTE 15.20] Replace "temporary, and the temporary" with "temporary variable, and that variable" because "temporary" is an adjective, not a noun. [318:29-30 15.4.2.4p14] Replace "(including" with ", or". Replace "designator)." with "designator, or an assumed-size array." [325 first line of NOTE 15.34] It's unfortunate that a page break occurred after only one word. [326:7 15.5.3p1] Replace "array arguments shall have the same shape" with "actual arguments shall be conformable". Compare to the last sentence of 15.5.4p1. [328 first line of NOTE 15.38] What is "the reference?" Replace "the reference" with "a reference to an intrinsic procedure" [329:38 C1543] C1543 is expressed in an unusual way. Replace C1543: "C1543 (R1526) "A shall not contain any more than once." [330:31-32 C1555] C1555 is entirely covered by C1554. Delete C1555. [331:32 15.6.2.2p4] Replace "On completion of execution of the function" with "When execution of the function completes". [331:34 15.6.2.2p4] Replace "is completed" with "completes." [334:19 15.6.2.6p7] So as not to appear to allow a dummy argument in an ENTRY statement to be the same as a RESULT name, after "appears" insert "as a dummy argument". [334:37 15.6.2.6p13] For consistency with 15.6.2.6p12, replace "ELEMENTAL ... statement" with "the subprogram is an elemental subprogram". [335:15-16 15.6.3p2] A procedure defined by means other than Fortran might be invoked from the main program. Replace "procedure" with "scoping unit". Replace "its caller" with "that scoping unit at the point where it was invoked, as if it were a Fortran procedure". [335:25 C1576] After "transformational intrinsic" insert "function". [337:24 C1596] NOTE 15.48 says a pure subprogram is not allowed to perform a STOP operation. That's a bit weird since the introduction says an ERROR STOP statement can appear in a pure subprogram. If that's correct, replace "or " with ", or ". Otherwise delete "or STOP operation" from NOTE 15.48 [337 penultimate line of NOTE 15.48] For completeness, after "operation" insert ",or cause an impure final subroutine to be invoked". 2. Questions without edits ========================== [305:11-12 C1509] C1509 says an interface specification shall not specify a procedure that was specified previously in any accessible interface with the same generic identifier. A procedure might be accessible in a scoping unit using several names. Does this constraint apply to the procedure, or its local names? Does this need an interp? [311:13+ R1518+] Would this constraint be useful, necessary or harmful? "C1514a (R1515) A that has the INTENT or PROTECTED attribute shall have the POINTER attribute." [331:33 15.6.2.2p4] The shape of the value returned by a function with an allocatable result is determined by the shape of its function result, if the result is allocated. Should it be required to be allocated (because otherwise it has no shape)? It's hard to imagine otherwise. If so, before "a data pointer" insert "allocatable or", and at [331:36 15.6.2.2p4] append the sentence "If the function result is allocatable, on return the function result shall be allocated." Does this need an interp? [336:25 C1584] Presumably the prohibition against a pure function having a polymorphic allocatable result is to foreclose the possibility to invoke an impure finalizer. Is a polymorphic allocatable ultimate component OK? Does this need an interp? 3. For future consideration =========================== [320:9 15.5.2.6] The first sentence, viz. "The actual argument shall be allocatable", could be a constraint. [320:31-32 15.5.2.7p2] The first two sentences, viz. "If the dummy ... pointer assignment statement" could be a constraint. [321:2-5 15.5.2.8p1-2] Both paragraphs could be constraints.