J3/16-113r1 To: J3 Members From: Bill Long & Malcolm Cohen Subject: Clause 5 edits Date: 2016 February 08 References: 16-007 Discussion: ---------- In 5.1p1 we have "The type of a named data object is either specified explicitly in a type declaration statement or determined implicitly by the first letter of its name (5.7)." That seems to be out of date even for F2003 (CLASS(*) declaration). Certainly misses things declared TYPE(*). The minimal fix would be to insert "nonpolymorphic" before "named data object". Polymorphic ones can acquire a type by argument association, allocation, or pointer assignment. Response: This is talking about declarations, and thus about the declared type and not the dynamic type. This should be made clear by appropriate insertion of the word "declared". The same issue exists in 5.2p1, where we have "The type and type parameters are those specified by declaration-type-spec..." (with an exception case for CHARACTER type). The term includes both CLASS(*) and TYPE(*) syntax options. Response: As above. In 5.5.5p3 we say that the BIND attribute for a variable confers the SAVE attribute. Since such a variable has to be declared in the specification part of a module, the SAVE is automatic anyway. Restating that here seems redundant. Response: Agreed. R511 appears to be missing a "]" before the continuation square on the first line. Response: R511 line 1 contains two "[" and two "]", nothing missing. 5.5.14p1 says "Procedure pointers are described in 12.4.3.7.". But 12.4.3.7 is Procedure declaration statement. Not really where procedure pointers are described. 5.5.9 EXTERNAL attribute seems closer, where we say "... is a procedure pointer". More information is in 7.2.2.2 and 7.2.2.4. Response: We don't have a special subclause that describes procedure pointers, they seem simple enough anyway. This sentence should just be deleted. 5.5.18p1 has cross references for VALUE. It would be helpful to add a reference to 12.6.2.2, which contains an important constraint on VALUE and OPTIONAL. Response: The constraint on VALUE+OPTIONAL in a BIND procedure should not be in the subclause on "Function subprograms" anyway. It could go either with OPTIONAL, VALUE or the general part of procedure definition. Unfortunately 12.6.2.1 does not contain the procedure heading suffix, so this constraint would be better placed in VALUE. Edits are provided to move this constraint. In 5.6.11, rule R551 for , it appears there is an extra space between and <-list>. Response: Agreed. 5.7, constraint C590 reads "If IMPLICIT NONE is specified in a scoping unit, it shall precede any PARAMETER statements that appear in the scoping unit. No more than one IMPLICIT NONE statement shall appear in a scoping unit." This constraint is about statement ordering, but the beginning phrase is about specification. This needs rewording. Propose "If an IMPLICIT NONE statement appears in a scoping unit, it shall precede any PARAMETER statements that appear in the scoping unit. No more than one IMPLICIT NONE statement shall appear in a scoping unit." Response: Agreed. Edits to 16-007: ----- [89:4] In 5.1 Attributes of procedures and data objects, para 1, change the beginning of the third sentence "The type of a named data" to "The declared type of a named data". [89:14] In 5.2 Type declaration statement, para 1, in the first sentence, after "The type declaration statement specifies the" insert "declared". [94:11-12] In 5.5.5 BIND attribute for data entities, in the only sentence of para 3, "The BIND attribute for ... explicit specification.", delete "variable or" and make the whole sentence \obs font. [103:15-16] In 5.5.14 POINTER attribute, para 1, delete the sentence "Procedure pointers are described...". [105:18+] In 5.5.18 VALUE, at the end of the subclause insert constraint "C564a A dummy argument of a procedure with the BIND attribute shall not have both the OPTIONAL and VALUE attributes.". {This is right after the main constraint on disallowed attribute combinations with VALUE, so a reasonable location for it.} [111:7] In 5.6.11 PARAMETER statement, in R551 for , remove the space between "" and "<-list>". [113:6] 5.7 IMPLICIT statement, para 1, "Alternatively, it may" ->"An IMPLICIT NONE statement can" [113:7] After "scoping unit" insert ", or that external and dummy procedures need to be explicitly given the EXTERNAL attribute". [113:14] In 5.7 IMPLICIT statement, the first constraint (C590), at the beginning of the constraint change "If IMPLICIT NONE is specified" to "If an IMPLICIT NONE statement appears". [316:41-42] 12.6.2.2 Function subprogram, C1263, delete constraint "C1263 A variable that is a dummy ... VALUE attributes.". {Delete constraint from where no-one is likely to find it.}