07-190r2 To: J3 From: Van Snyder/Dick Hendrickson Subject: Comments on Clause 7 Date: 9 May 2007 ############################################################################# Part 1 Edits ############################################################################# Edits refer to 07-007r1. Page and line numbers are displayed. Absent other instructions, a page and line number or line number range implies all of the indicated text is to be replaced by associated text, while a page and line number followed by + (-) indicates that associated text is to be inserted after (before) the indicated line. Remarks are noted in the margin, or appear between [ and ] in the text. ------------------------------ 142:11-22 [It is confusing and verbose to say that the operation involves the specified list of operators, and then say that the operator is the operator in the operation. Why not define the operators first, as at [142:23-30]? Editor: Replace the paragraphs:] A numeric intrinsic operator is +, –, *, /, or **. A numeric intrinsic operation is an intrinsic operation for which the intrinsic-operator is a numeric intrinsic operator and the operands are of numeric type. The character intrinsic operator is //. The character intrinsic operation is an intrinsic operation for which the intrinsic-operator is a character intrinsic operator and the operands are of type character. A logical intrinsic operator is .AND., .OR., .XOR., .NOT., .EQV., or .NEQV.. A logical intrinsic operation is an intrinsic operation for which the intrinsic- operator is a logical intrinsic operator and both operands are of type logical. A bits intrinsic operator is //, .AND., .OR., .XOR., .NOT., .EQV., or .NEQV.. A bits intrinsic operation is an intrinsic operation for which the intrinsic- operator is a bits intrinsic operator and at least one operand is of type bits. ------------------------------ 145: Note 7.19 [insert the following after "A / 5.0":] A ** B 1/(A ** (-B)) A ** B (1/A) ** (-B) For integer A and B with nonzero A and negative B, either of the last two alternative forms show that the result is zero. The final alternative form is not recommended for real A if B is large and sufficiently negative that log2 |B | is greater than the number of guard digits. ------------------------------ 146:7-9 [Paragraph concerns evaluation, not interpretation, and it's confusing. Editor: Move "with the value of x2 " before "concatenated", than move the paragraph to [146:10+].] ------------------------------ 147:1, Table 7.8 [Paragraph and Table 7.8 concerns evaluation, not interpretation, and it's confusing. Editor: Move [147:2] to [147:1-].] ------------------------------ 148:1-5, Table 7.10 [Paragraphs and Table 7.10 concern evaluation, not interpretation, and it's confusing. Editor: Move [148:6] to [148:1-].] ------------------------------ 149:10-11 [Paragraph is about evaluation, not interpretation, notwithstanding that it says "interpreted. . . ." Editor: Replace "is interpreted as having" by "has", then move the paragraph to [150:15+] ------------------------------ 149:16-17 [Paragraph is about evaluation, not interpretation, notwithstanding that it says "interpreted. . . ." Editor: Replace "is interpreted as having" by "has", then move the paragraph to [150:15+] ------------------------------ 150:10-14 [Paragraphs are about evaluation, not interpretation, notwithstanding that they say "interpreted. . . ." Editor: Replace "is interpreted as having" by "has", then move the paragraphs to [150:15+] ------------------------------ 153:1+ [Needs an ISO-mandated subclause heading.] Defer to Editor ------------------------------ 153:6-8 [Editor: Replace "type parameters and the declared and dynamic types" by "declared and dynamic type and type parameters"; replace "type parameters and the declared and dynamic type" by "declared and dynamic type and type parameters".] ------------------------------ 156:18 [Can't reference both functions at once. Editor: Replace "functions" by "function".] ------------------------------ 156: Note 7.34 [Creating a new instance while construction of one is in progress shouldn't really be a problem. The real problem is that the recursion can't stop. Editor: Replace "The prohibition . . . progress" by "Recursion would not terminate and therefore is prohibited.".] ------------------------------ 156:35 [A module procedure is in a module, so this applies to module procedures, too. Editor: Insert "the specification-part of " before "a module".] ------------------------------ 157:10-11 [One might momentarily wonder what is "a reference to an initialization target?" Editor: Exchange "a reference to the intrinsic function NULL" and "an initialization target".] ------------------------------ 157:23-28 [Editor: Move item (8) and its sub-items to [157:12+] to make the structure parallel to the list in 7.1.11.] ------------------------------ 158:12 [A module procedure is in a module, so this applies to module procedures, too. Editor: Insert "the specification-part of " before "a module".] ------------------------------ 158: Note 7.36 [Replace "explicit-shaped" by "explicit-shape" in the last line of the note.] ------------------------------ 158:16+ [Needs an ISO-mandated subclause heading.] Defer to Editor; perhaps move the sentence to the next section? ------------------------------ 158:17 [The subclause is about assignment statements, not variables; the assignment statement ought to be the subject. Editor: Replace the paragraph:] Execution of an assignment statement can define or redefine the value of a variable.[not "defines or redefines" because zero-size arrays or zero-length strings don't get defined or redefined.] ------------------------------ 159:7 [Editor: Replace "variable " by "the variable".] ------------------------------ Note 7.42 [Every character kind has a blank, so the blank padding character is kind dependent, not processor 161: dependent. Editor: Delete the first sentence.] ------------------------------ 163:22 [Editor: Replace "operation" by "assignment".] ------------------------------ 163:26 [In dozens of places in the last several pages, we were able to get by with "the variable" instead of "the variable in the assignment." Editor: Replace "the the variable in the assignment" by "the variable". ------------------------------ 166:16 [Editor: Delete "no" and insert "not" before "specified".] ------------------------------ 169:16 [Editor: Insert "control" after "pending".] ------------------------------ 171:12 Allow pointer functions on the left of a FORALL delete C746 ------------------------------ 172:1 [Editor: Replace "variable that" by "variable. If type-spec appears the variable is an integer of the specified kind. Otherwise it".] ------------------------------ 172:Note 7.58 [Make the note more illustrative: Replace "INTEGER :: X = -1" by "REAL :: X = -1.5", insert "INTEGER ::" before "X" in the FORALL statement, replace "-1" by "-1.5" in the text after the code.] ------------------------------ ############################################################################# Part 2 Comments and questions without edits ############################################################################# ------------------------------ 149:4 What happens when an object is converted to type bits? Where is "converted" defined? Perhaps "converted to" should be "interpreted as if it were of ". Answer: It's defined in table 7.14 on page 162. ------------------------------ 154:18-155:6 It is confusing to specify some of the material on type, type parameters and shape here, some in 7.1.5.*, and some in both places. Answer: Subgroup doesn't want to make a change here. ------------------------------ Clause 7.2 The term "variable" and the syntax term "variable " appear to be used randomly. Do we want to be consistent? Answer: Refer to editor ------------------------------ 163:2+ Do we need to say something about intrinsic assignment of derived-type objects from one image to 163:2+ another if the type has pointer components? Either "it's prohibited" or "pointer components become undefined?" Answer: the pointers become undefined, see page 484. ------------------------------ 165:25 There's no normative mention here of pointer assignment arising from intrinsic derived-type assignment. In light of C725 at [164:29] it appears that it's impossible for a pointer and target to be on different images. How does it come about? Answer, that's correct. C725 prevents this. ------------------------------ 166:29-33 Should these paragraphs be constraints, say C733a and C733b? Answer: Perhaps, but we don't recommend doing it at this time. the standard is inconsistent about what is a constraint. ------------------------------ 171:12 What is the point of C746? What's the problem with a left-hand function in a forall-assignment-stmt , so long as it's pure? Isn't that already covered by C744? Answer: We agree, delete C746 at 171:12 ------------------------------ 172:11 There's no requirement that if functions appear in the subscripts or stride they shall be pure, or that one shall not depend upon another, so how can we get away with evaluating them in any order? Answer: There is the general requirement that functions are not allowed to have side-effects on anything in the statement they appear in. ------------------------------ 176:4-5 Shouldn't this be a constraint? Answer: Perhaps, but we don't recommend doing it at this time. the standard is inconsistent about what is a constraint. ############################################################################# Part 3 Do these need an interp? ############################################################################# ------------------------------ 155:15-17 The requirement ought to be a constraint. Either way, it prevents using length type parameters within type definitions. Conflicts with C453 [66:1-3]. C540 [94:11-12] also prevents using specification expressions for component bounds. Defer to /DATA ------------------------------ 171:2 Do we need "and forall-triplet-spec " after "scalar-mask-expr "? Answer: No. There is the general requirement that functions are not allowed to have side-effects on anything in the statement they appear in. ------------------------------ 171:12+ It appears to be permitted to have identical index-names in the same FORALL statement. Shouldn't there be a constraint against it? Answer: See 478:41, it's prohibited in the section about statement and construct entities in clause 16. ############################################################################# Part 4 edits not done from earlier versions of part 1 ############################################################################# 144:2-3 [Doesn't belong here; probably shouldn't even be normative. Editor: Delete the paragraph.] ------------------------------ 144:4-12 [Why is [144:4-9] so long winded? Editor: Replace the paragraph:] If both operands of a division operation are integers the result q is the integer such that x1 /x2 = q + r where r is an integer such that 0 |r| < |x2 | and the sign of r is the same as the sign of q . [Then move 7.1.5.2.2 and 7.1.5.2.3 to [145:3-].] ------------------------------ 152: Note 7.30 [Editor: Replace "often" by "obviously".] ------------------------------ 153:34-154:2 [Editor: Move to [120:4+], where it belongs.] ------------------------------ 154:3 [Editor: Insert "(6.2.2.2.2)" after "subscript".] Subgroup couldn't find "subscript", but has rejected this edit in other places ------------------------------ 155:20-21 [Editor: Insert "an initialization expression or" before "an expression", insert "or defined by a specification function" after "intrinsic" (this is a little bit of feature creep), delete item (1) from the list.] ------------------------------ 161: Note 7.40 [Editor: In he antepenultimate line of Note 7.40 replace "will cause" by "causes"; in the penultimate line replace "will be" by "is".] ------------------------------ 165:3 [Editor: Insert "(6.2.2.2.2)" after "subscript".] ------------------------------ 174: Note 7.61 [Editor: Replace "will be" by "are" in the text between the input and output.]