To: J3 Members J3/16-200 From: Van Snyder Subject: Comments on clause 5 References: 16-007r1 Date: 2016 May 23 1. Edits ======== [2:20+ 1.3.4+] Insert a subclause of 1.3.4 "1.3.4.0 allocatable array array with the ALLOCATABLE attribute(5.5.3)" {Compare to [2:24-26 1.3.4.2].} [89:4-7 5.1p1] The sentences beginning "The declared type of a named..." are incomplete or contradictory. The type of an associate name is neither declared explicitly nor implied by its first letter.... These sentences are only introductory summaries, so it's not important to list everything about attributes here. It would be simpler to delete them. Delete "The declared type of a named... separate specification statements." [91:28 C515] C515 would be better positioned with other constraints concerning at [97:2+ C532+]. Move it there. [92:1-2 C516] C516 would be better positioned with other constraints on at [324:38+ C1261+]. Move it there. [82:18-19 5.5.3p1] Replace "An" with "Space for". Delete "a variable for which space is". After "(6.7.1)" replace "or" by a comma. At the end of the sentence append "or by a structure constructor (4.5.10)". We don't need a definition for what an allocatable entity is because that's in 1.3. [96:14+2 NOTE 5.11] After "corank" append "(5.5.6)". [97:5 5.5.8.2p2] A local variable that is an explicit-shape array cannot be other then a named local variable. Delete "named" because it makes one wonder "what about explicit-shape local variables that are not named?" [97:26-27 5.5.8.3p1] After "allocatable array" insert "(1.3.4.0)" {See above}. After "array pointer" insert "(1.3.4.2)". Delete "An allocatable ... POINTER attribute" because the terms are defined in 1.3.4.0 and 1.3.4.2. [97:35 5.5.8.4] After "allocated" insert "(5.5.3)" so that one is as least reminded to read about allocation other than by an ALLOCATE statement. [98:14 R523] Set the syntax term in syntax-term font. [98:34-36 5.5.8.5p5] The penultimate sentence doesn't need repeating. The final sentence is almost identical to constraint C627. Delete "An assumed-size ... last dimension." [99:20 C540] After "assumed-rank array" insert and the dummy argument is an actual argument associated with an assumed-rank dummy argument, or it is the in a SELECT RANK construct that has a RANK DEFAULT or RANK (*) part". [99:22+ C540+] Insert a NOTE: "NOTE 5.12a Constraint C540 ensures that an assumed-rank array will not appear in a context that requires its shape." [100:21-22,26 5.5.10p3-4] We do not have pointer constants so a casual reading might suggest "variable" is just redundancy. To make it clearer what's required here replace "shall be a pointer variable" with "shall not be a procedure pointer" twice. [101:5 5.5.11p2] We expect readers to note everything. Having "Note that" suggests other things they ought to note are less important (than provisions printed in obsolescent font). Replace "Note that a" with "A". [103:3 C554] The constraint could be construed to require the PROTECTED attribute. Replace it: "C554 The PROTECTED attribute shall not be specified except within the specification part of a module." [104:12+11 NOTE 5.24] In Fortran, pointers don't "point at," they're "associated with." Replace "point only to an entity with" with "only be associated with an entity that has". [105:21+ 5.5.19+] Insert a NOTE: "NOTE 5.24a Because the provision in 7.1.5.2.4 concerning intrinsic operations has been extended to intrinsic functions, the REAL intrinsic function with an argument of real type, with or without a KIND argument, might not actually do anything. To cause invocation of the REAL intrinsic function to do what you might expect it to, assign its argument to a variable of the desired kind that has the VOLATILE attribute." [116:12 C5104] C441 prohibits sequence types from having type parameters. Delete "with the same type parameter values". [116:19+5-4 NOTE 5.42] The second through fifth paragraphs duplicate C598 and C5102-C5105, less than half a page distant. Further, they express requirements, violating ISO requirements. Delete the second through fifth paragraphs. 2. Constraintification ====================== [107:11-15 5.6.7p2-3] Delete 5.6.7p2-3 in favor of constraints below. [107:28+ R542+] Insert constraints: "C573a (R539) A nonpointer variable that has default initialization shall not appear in a ." "C573b (R539) A variable that appears in a and has not been typed previously shall not appear in a subsequent type declaration that does not confirm its implicit typing (5.7)." "573c (R539) If an array name, array section, or array element appears in a , the array properties of the variable name shall have been established by a previous specification statement." [110:12-15 5.6.11p3] Replace with constraints: "C587a (R552) A that has not been typed previously shall not appear in a subsequent type declaration that does not confirm its implicit typing (5.7)." "C587b (R552) A that is an implied-shape array (5.5.8.6) shall have had its rank specified in a prior specification statement." "C578c (R552) A that is an explicit-shape array (5.5.8.2) shall have had its shape specified in a prior specification statement." "C578d (R552) A shall not be an assumed-shape array (5.5.8.3), assumed-size array (5.5.8.4), deferred-shape array (5.5.8.3), or an assumed-rank entity (5.5.8.7)." [110:16-19 5.6.11p3] Make the paragraph constraint C587 on syntax rule R552. [116:19+ C5108+] Move [117:8-9 5.9.1.5p1-2] here and make them constraints C5108a and C5108b on syntax rule R569. Then delete 5.8.1.5 because it will be empty. [119:2-6 5.9.3p1-3] Convert these paragraphs to constraints.