J3/15-229 To: J3 Members From: Van Snyder Subject: Clause 12 Date: 2015 September 25 1. Edits ======== [282:14-15 12.3.2.1p1] Replace "Onject, ... indicator" with "object, \obs{an asterisk (alternate return indicator), or} a dummy procedure". Thereby, if the \obs{} is eliminated, the sentence still reads gramatically. [282:22-23 12.3.2.2p1] Replace "If" with "Whether"; delete ", it". {Not being assumed or deferred is acharacteristic.} [282:26 12.3.2.3p1] Replace "the" with "its". {"The" interface might be confused with the interface of the procedure of which the dummy procedure is a dummy argument.} [282:35 12.3.3p1] Replace "If" with "Whether"; delete ", this". {Not being assumed or deferred is acharacteristic.} [283:9 23.5.2p3] Replace "is a set of" with "specifies"; replace "with the dummy argument names" with "and dummy argument keywords, but does not identify a procedure". {The dummy argument names of a procedure that is invoked using that interface for, e.g., a procedure pointer, might have dummy arguments with different names in the corresponding positions. The abstract interface identifies the dummy argument keywords to be used in a reference, not the dummy argument names.} [283:19-20 12.4.2.2] Delete "it is not a statement function and" because a statement function cannot have an explicit interface. See the list in 12.4.2.1p1. [285:29 12.4.3.2p6] After "characteristics" insert "and dummy argument keyword names" {which are not characteristics}. [288:7,11-12 12.4.3.5.1p2] Move the last sentence of the paragraph, viz. "The in a GENERIC statement...." to be the second sentence of the paragraph. [293:38-398 12.4.3.7p7] Set "and ... intrinsic procedure" in \obs font {see 12.5.2.9p1}. [294:12 12.4.3.9p1] Append "(12.5.2)". [295:21+2 NOTE 12.19] Generic resolution does not happen at runtime. Replace "When resolving" with "To resolve"; replace "constraints" with "constraint C1234"; replace "ensure" with "ensures". {There is only one constraint dealing with a coindexed object.} [297:n-1 NOTE 12.22] In the penultimate line, replace "block" with "body". [299:9-10 12.5.2.4p3] Replace "agree with" with "have the same values as" twice {"agree with" has no meaning.} [299:13+ 12.5.2.4p3+] Move [299:19-20 12.5.2.4p5] here. [299:16 12.5.2.4p4] Replace "an array" with "a present array". [299:22+5 NOTE 12.25] At the end, append "unless the dummy argument has the INTENT(IN) or VALUE attribute". [301:5,9 C1245,C1246] Exchange "ASYNCHRONOUS" and "VOLATILE" {just to make them in alphabetical order.} [301:19 12.5.2.5p3] Replace "agree with" with "have the same values as" {"agree with" has no meaning.} [302:21 12.5.2.6p7] Replace ", an allocated" with "and its associated actual argument is allocated, the". [302:28 12.5.2.7p2] Replace "the dummmy" with "a present dummy"; replace "the actual" with "its associated actual". [302:31 12.5.2.7p4] Replace "The nondeferred... agree" with "The rank of the actual argument shall be the same as that of the dummy argument. The type parameter values of the actual argument shall have the same values as the corresponding ones of the dummy argument that are not assumed or deferred". {Compare to [301:18-20 12.5.2.5p3], as repaired above.} [302:33 12.5.2.7p4] Insert "corresponding" before "actual". [304:11 12.5.2.9p2] Replace "be associated with" with "correspond to". [304:12 12.5.2.9p2] Replace "argument" with "procedure". [304:17 12.5.2.9p4] After "name" insert "of the actual argument". [304:26 12.5.2.10 subclause heading] Replace "and alternate return indicators" with "corresponding to asterisk dummy arguments" {"alternate return indicator" isn't defined.} [305:1 12.5.2.11p4] Replace "An" with "A present". [305:9 12.5.2.12p1] Append "has the OPTIONAL attribute and" [305:11,14,14+ 12.5.2.12p1] {12.5.2.7.5 suggests that an unallocated allocatable actual argument that corresponds to an INTENT(IN) optional pointer dummy argument is not present.} Delete "or" at [305:11]; replace the semicolon at [305:14] with ", or", and append a list item: " o has the POINTER and INTENT(IN) attributes and corresponds to an allocatable actual argument that is not allocated;" {Does this need an interp?} [306:3 12.5.2.13p1(2)] Replace "it ... only" with "the actual argument or a subobject thereof, or an associated entity or subobject thereof, shall not be referenced except". [307:n-6 NOTE 12.38] Insert "argument associated with" before "B(1:2)" and "C(4:7)". [308:23 12.5.5.1p2] Append "if that scoping unit contains". [309:1 12.5.5.1p2(1)] After "name" insert "or GENERIC statement whose is that name". [309:1,2,4,6 12.5.5.1p2(1-4)] Delete "if that scoping unit contains" four times. [309:1,3,5 12.5.5.1p2(1-3)] Replace three semicolons with commas. [309:9 12.5.5.1p3] Append "if that scoping unit contains". [309:10,12,13,15,16,18 12.5.5.1p3(1-6)] Delete "if that scoping unit contains" six times. [309:11,12,14,15,17 12.5.5.1p3(1-5)] Replace five semicolons with commas. [311:19 12.6.2.1p1] Set "or more" and the final "s" of "procedures" in \obs font. [311:21 12.6.2.1p2] After "pure" insert "or impure"; after "recursive" insert "or nonrecursive". [312:9 3.6.2.1p3] Set "or any ... subprogram" in \obs font. [312:34 C1261] Replace "attributes" with "attribute" {because it cannot have both. [313:17,19 12.6.2.2p4] Replace "occurrences" with "appearance" twice. {Names "appear"; they don't "occur".} [314:21 12.6.2.4p1] Insert "unsaved local" before "procedure". [314:24-26 12.6.2.4p4] {The procedure might be a function.} Replace "caller" with "invoker" thrice at [314:24,25,26]. Replace "call sequence" with "invocation sequence" thrice at [314:25,26,27]. [314:29 12.6.2.4p4] Replace "from when" with "at the time". [315:30-31 16.6.2.6p3] Replace "The name ... is provided" with "If RESULT appears, the name of the function result of the function is and all appearances of in statements in its scope refer to the function itself. If RESULT does not appear, the name of the function result is and all appearances of the result name in statements in its scope refer to the function result". {Compare to 12.6.2.2p4.} {Does this need an inter [316:39 12.6.2.8p1] Replace "may" with "might". {Replace permission with possibility.} [317:30 12.6.4p4] After "function" insert "name"; delete "supplied as". [318:35 C1296(4)] After "attribute" insert "or that has a pointer component at any level of component selection". {Does this need an interp?} [319:8+2 NOTE 12.51] Delete "the"; replace "statement" with ", RETURN, END BLOCK, END FUNCTION, and END SUBROUTINE statements" [320:17-18,29 12.8.1p3, 12.8.3p1] Move the first sentence of 12.8.1p3 at [320:17-18] to be the first sentence of 12.8.3p1 at [320:29]. {It pertains to actual arguments, not elemental procedure declaration or interface.} [320:27+6 NOTE 12.54] In the last line, insert a space after "J = 1," 2. Comments and questions without edits ======================================= [283:17 12.4.2p1] "The interface of a statement function is always explicit" could be a note because it's not in the list immediately above. [284:5-6 12.4.3.1p1] ", except that the ENTRY statement shall not appear in an interface body" could be a note. See C1206. [285:1-3 C1203] The reason for C1203 is to avoid the ambiguity whether PROCEDURE(REAL) :: F declares a function F with an implicit interface and a real result, or a function F that has an explicit interface provided by an abstract interface named REAL. For the same reason, shouldn't derived type names be excluded too? Does this need an interp? [293:10 C1222] C1222 presumably has the same reason as C1203. Should derived-type names be prohibited too? Does this need an interp? [295:16 C1235] The purpose of C1235 is not obvious. A note would be helpful. [299:16-18 12.5.2.4p4] I know this has been around since F77, but it appears not to work. Suppose the actual argument is a character scalar of length 18, and the dummy argument D has explicit length 1 and shape [4,*]. This appears to need the same sort of restrictions as coindices, e.g., D(2,4) can be referenced, but not D(3,4) or D(4,4) cannot. The paragraph doesn't mention an assumed assumed-length array dummy argument. Does this work at all in that case? Does this need an interp? [300:19 12.5.2.4p13] Should "assumed-shape" have been "assumed shape without the CONTIGUOUS attribute"? [300:28 12.5.2.4p15] Is the use of LBOUND and UBOUND here instead of the corresponding description for assumed-shape arrays intended? In the latter case, if the lower bound is not specified (which it cannot be in the case of an assumed-rank dummy argument), it is 1, no matter what the lower bound of the actual argument is. [301:15-17 12.5.2.5p2] Could be a constraint because explicit interface is required. [301:18 12.5.2.5p3] The first sentence could be a constraint because explicit interface is required. The KIND case of the second sentence could be a constraint because explicit interface is required. [301:21 12.5.2.5p4] Could be a constraint because explicit interface is required. [302:4 12.5.2.6p2] The first sentence could be a constraint because explicit interface is required. [302:6 12.5.2.6.4] Could be a constraint because explicit interface is required. [302:20 12.5.2.6p7] The first sentence could be a constraint because explicit interface is required. [302:28-29 12.5.2.7p2] The second sentence could be a constraint because explicit interface is required. [303:2-5 12.5.2.8p1-2] Could be constraints because explicit interface is required. [303:n NOTE 12.34] Wouldn't it be easier to define "pass by reference?" [304:18-20 12.5.2.9p5] The first sentence could be a constraint because explicit interface is required. [312:8 12.6.2.1p2] "any" should become "that" when/if ENTRY is deleted. [317:21-23 C1282] Should C1282 also apply to the function name? Does this need an interp? [318:34 C1296(3)] A READONLY attribute for pointers could allow this. [319:5- C1296+] Is it OK to allocate or deallocate an allocatable variable accessed by host or use association, or a subobject thereof? Does this need an interp? [319:7-8 C1298] C1298 prohibits local polymorphic entities, or local entities that have polymorphic components at any level of component selection, unless the code is careful to leak storage allocated to pointers. Was this intended? Why not simply say so?