02-204r1 From: Dan Nagle & Stan Whitlock To: J3 Date: 16 May 02 Subject: Integrate F95 Corrigendum 2 The following edits bring Corrigendum 2 into the draft. Edits against 02-007r1: F95 Page 3 [3:32+] 87, 92 Subclause 1.5.1 Add these extra items at the end on 1.5.1: (3)Earlier standards specified that if the second argument to MOD or MODULO was zero, the result was processor dependent. This standard specifies that the second argument shall not be zero. (4) The PAD= specifier in the INQUIRE statement in this standard returns the value UNDEFINED if there is no connection or the connection is for unformatted input/output. The previous standard specified YES. F2K already done [3:26-29] F95 Page 39 [39:20] 22 Subclause 4.4.1 Replace the second line of R429 by "or => " R429a " is Constraint: shall be a reference to the intrinsic function NULL with no arguments." F2K already done [44:40-41] and [70:25-27] F95 Page 45 [45:7-9] JP-04 Subclause 4.4.4 Replace the paragraph that starts "Where a component" by "Where a component in the derived type is a pointer, the corresponding constructor expression shall be an allowable target for such a pointer in a pointer assignment statement (7.5.2). " F2K Replace [61:10-12] With "Where a component in the derived type is a pointer, the corresponding shall be an allowable target for such a pointer in a pointer assignment statement (7.5.2). " F95 Pages 45 and 46 [45:38+, 46:1] 71 Subclause 4.5 Add to end of the paragraph that follows the constraints: "The character length of an in an whose iteration count is zero shall not depend on the value of the implied DO variable and shall not depend on the value of an expression that is not an initialization expression." Page 47 [47:40] 22 In the first line of page 46, replace "an sequence" with "a sequence of elements" . F2K [67:9+] Add: "The character length of an in an whose iteration count is zero shall not depend on the value of the implied DO variable and shall not depend on the value of an expression that is not an initialization expression." [67:13] replace "an sequence" with "a sequence of elements" . F95 Page 47 [47:40] 22 Subclause 5.1 Replace the second line of R505 by "or => " F2K already done [70:24-27] F95 Page 48 [48:26+] JP-06 Subclause 5.1 After line 26 of page 48, add: "Constraint: The shall be the name of a data object." F2K already done [70:21] F95 Page 49 [49:9, 49:20-21] JP-08, 2 Subclause 5.1 In the paragraph that begins "If a ," replace "" by " ". F2K [72:26] replace "" by "" F95 In the paragraph that begins "If , replace NULL( ) by "" twice. F2K already done [72:38] F95 Page 55 [55:41] JP-12 Subclause 5.1.2.4.3 In the fifth line from the bottom of page 55, delete "statement" and replace "in a" with "by" . F2K [79:22] delete "statement" and replace "in a" with "by" . F95 Page 62 [62:19, 48] 22 Subclause 5.2.10 Replace the fifth line of R540 by "or " F2K already done [88:22] F95 In the penultimate line of page 62, replace "NULL( )" by "pointer association status" F2K already done [89:7] F95 Page 63 [63:1, 7, 10] 22 Subclause 5.2.10 In lines 1, 7 and 10 of page 63, replace "NULL( )" by "" thrice. F2K already done [89:9-10,11] F95 Page 66 [66:11] JP-16 Subclause 5.4 In the paragraph that begins "Any " , replace "in more than one NAMELIST statement" by "more than once in the NAMELIST statements" . F2K [95:12] replace "in more than one NAMELIST statement" by "more than once in the NAMELIST statements" . F95 Page 80 [80:34] 93 Subclause 6.3.1.2 In item (1) in the list in clause 6.3.1.2, change "; it" to ". It shall not be supplied as an actual argument except to certain intrinsic inquiry functions. It" . F2K [113:2]change "; it" to ". It shall not be supplied as an actual argument except to certain intrinsic inquiry functions. It" . F95 Page 91 [91:41] 19 Subclause 7.1.4.1 In the last line of page 91, add "The optional argument shall also be present if the reference appears as an actual argument corresponding to a dummy argument with assumed character length." F2K [334:33+] add "The optional argument shall also be present if the reference appears as an actual argument corresponding to a dummy argument with assumed character length." F95 Page 94 [94:12, 38, 40-41] 94, 90 Subclause 7.1.6.1 Add to end of list item (6) "where the argument is not of type character with a length that is assumed or defined by an expression that is not an initialization expression," . F2K [129:19] add "where the argument is not of type character with a length that is assumed or defined by an expression that is not an initialization expression," . F95 In the first line of the last paragraph of page 94, replace "for a type parameter" by "that depends on a type parameter" . F2K [130:3]replace "for a type parameter" by "that depends on a type parameter" . F95 Replace the last sentence of page 94 by "The prior specification may be to the left of the inquiry function in the same statement, but shall not be within the same ". . F2K [130:5-6] replace the last sentence with "The prior specification may be to the left of the specification inquiry in the same statement, but shall not be within the same ." . F95 Page 96 [96:32, 34-35] 90 Subclause 7.1.6.2 In the first line of the last paragraph of the subclause, replace "for a type parameter" by "that depends on a type parameter" . F2K [128:16] replace "for a type parameter" by "that depends on a type parameter" . F95 Replace the second sentence of the last paragraph of the subclause by "The prior specification may be to the left of the inquiry function in the same statement, but shall not be within the same ." F2K [128:18-19] . Replace the second sentence of the last paragraph of the subclause by "The prior specification may be to the left of the specification inquiry in the same statement, but shall not be within the same ." F95 Page 97 [97:1, 97:5] 86 Subclause 7.1.7 In the first line of page 97, replace "in an expression" with "of an intrinsic operation" In the fifth line of page 97, replace "all of its components" with "it" . F2K already done [130:8] replaces f95 [96:45-97:5] F95 Page 113 [113:17, 20+] 20 Subclause 7.5.3.2 In the first line of the paragraph following NOTE 7.48, delete "a WHERE statement or" ; after the paragraph, add the new paragraph: "Upon execution of a WHERE statement that is part of a , the control mask is established to have the value .AND. . The pending mask is not altered". F2K [150:20] delete "a WHERE statement or" [150:23+] add the new paragraph "Upon execution of a WHERE statement that is part of a , the control mask is established to have the value .AND. . The pending mask is not altered". F95 Page 136 [136:33] 24 Subclause 9.2.1.3.1 At the end of the last paragraph of subclause 9.2.1.3.1 add "If a nonadvancing output statement leaves a file positioned within the current record and no further output statement is executed for the file before it is closed or a BACKSPACE, ENDFILE, or REWIND statement is executed for it, the file is positioned after the current record before the specified action is performed." F2K already done [179:33-180:2] . F95 Page 150 [150:33,36+] 66 Subclause 9.4.4 In list item 6, delete "an error condition," and change ", or" to "or" . Add the following after list item (8): "If an error condition occurs during any of the above operations, execution of the data transfer statement terminates, any variable specified in an IOSTAT= specifier becomes defined, and the error condition is processed as described in 9.4.3. " F2K already done [198:1,5-6] F95 Page 159 [159:40-41] 92 Subclause 9.6.1.22 Replace the second sentence of the paragraph in section 9.6.1.22 with the following. " The in the PAD= specifier is assigned the value YES if the connection of the file to the unit included the PAD= specifier and its value was YES or if there was no PAD= specifier. If there is no connection or if the connection is not for formatted input/output, the is assigned the value UNDEFINED." . F2K already done [215:11-14] F95 Page 160 [160:20] F90/209 Subclause 9.7 After "statement" in the second line of the subclause, insert "or a STOP statement" . F2K [219:22+] [from section 2 of paper 206] insert a new section between 9.9.5 and 9.10 Restrictions on function references in input/output statements A function reference shall not appear in an expression anywhere in an input/output statement if such a reference causes a STOP statement, or an input/output statement that references an external unit, to be executed. Note xx Restrictions in the evaluation of expressions (7.1.8) prohibit certain side effects. End Note F95 Page 171 [171:23] 11 Subclause 10.5.4.1.2 In the last line of the table in 10.5.4.1.2, change ".1" to ".0" . F2K already done [233:1-] F95 Page 175 [175:5, 175:33+] JP-31, 25 Subclause 10.8 In the fifth line of page 175, replace "constant or" by "constant, optionally signed if integer or real, or" . F2K [237:20]replace "constant or" by "constant, optionally signed if integer or real, or" . F95 Subclause 10.8.1 Add the following as a new paragraph, just before NOTE 10.26 "For the form of an input value, the constant is interpreted as a nondelimited character constant if the first list item corresponding to this value is of type default character, there is a nonblank character immediately after , and that character is not an apostrophe or a quotation mark; otherwise, is interpreted as a literal constant. " F2K 238:5+ Add a new paragraph "For the form of an input value, the constant is interpreted as a nondelimited character constant if the first list item corresponding to this value is of type default character, there is a nonblank character immediately after , and that character is not an apostrophe or a quotation mark; otherwise, is interpreted as a literal constant. " F95 Page 178 [178:40] JP-31 Subclause 10.9 In the fifth line of the paragraph that starts "Each value is" , replace "constant and" by "constant, optionally signed if integer or real, and" . F2K [241:22] replace "constant and" by "constant, optionally signed if integer or real, and" . F95 Page 179 [179:32-33] 10 Subclause 10.9.1.1 Replace the last sentence of subclause 10.9.1.1 by "In the input record, each object name or subobject designator may be preceded and followed by one or more optional blanks but shall not contain embedded blanks. ". F2K [242:19-20] replace the sentence with "In the input record, each object name or subobject designator may be preceded and followed by one or more optional blanks but shall not contain embedded blanks. ". F95 Page 194 [194:19-20, 194:21-23] 21, F90/211 Subclause 12.3.2.1 In the fourth constraint following R1207 delete "and, if included, ... " and add: " If the includes , the shall specify the same . If the includes ASSIGNMENT(=), the shall specify ASSIGNMENT(=). If the includes OPERATOR(), the shall specify the same . If one is .LT., .LE., .GT., .GE., .EQ., or .NE., the other is permitted to be the corresponding operator <, <=, >, >=, ==, or /=. ". F2K [256:24] delete "and, if included, ... " and add: " If the includes , the shall specify the same . If the includes ASSIGNMENT(=), the shall specify ASSIGNMENT(=). If the includes , the shall specify the same . If the includes OPERATOR(), the shall specify the same . If one is .LT., .LE., .GT., .GE., .EQ., or .NE., the other is permitted to be the corresponding operator <, <=, >, >=, ==, or /=. ". F95 Replace the fifth constraint following R1207 with "Constraint: A in a shall not specify a procedure that is specified previously in any in any accessible interface block with the same generic identifier. " F2K already done [257:7-8] F95 Page 197 [197:17] F90/205 Subclause 12.3.2.2 Add at the end of the first paragraph after R1208 "In an external subprogram, an EXTERNAL statement shall not specify the name of a procedure defined by the subprogram. " F2K [262:5] add at the end of the paragraph "In an external subprogram, an EXTERNAL statement shall not specify the name of a procedure defined by the subprogram. " F95 Page 198 [198:7-9] 88 Subclause 12.3.2.3 Replace lines 7-9 of page 198 by "If a specific intrinsic function (13.13) is used as an actual argument, it shall have been explicitly declared to have the INTRINSIC attribute. " F2K already done [82:7-8] F95 Page 202 [202:43-45] 91 Subclause 12.4.1.5 Replace the first sentence of 12.4.1.5 by "A dummy argument or an entity that is host associated with a dummy argument is not present if the dummy argument (1) is not associated with an actual argument, or (2) is associated with an actual argument that is not present. Otherwise, it is present. " F2K [270:23-25] replace the first sentence with "A dummy argument or an entity that is host associated with a dummy argument is not *present* if the dummy argument (1) is not associated with an actual argument, or (2) is associated with an actual argument that is not present. Otherwise, it is present. " F95 Page 206 [206:7-10] 18 Subclause 12.4.3 Replace the final sentence of subclause 12.4.3 by "A reference to an elemental subroutine (12.7) is an elemental reference if there is at least one actual argument corresponding to an INTENT(OUT) or INTENT(INOUT) dummy argument, all such actual arguments are arrays, and all actual arguments are conformable." . F2K [274:12-15] replace the final sentence with "A reference to an elemental subroutine (12.7) is an elemental reference if there is at least one actual argument corresponding to an INTENT(OUT) or INTENT(INOUT) dummy argument, all such actual arguments are arrays, and all actual arguments are conformable." . F95 Page 207 [207:8,32] 95 Subclause 12.5.2.2 Before "." in the first constraint after R1220, insert "and shall not be the same as the in any ENTRY statement in the subprogram" . F2K [277:7] before "." insert "and shall not be the same as the in any ENTRY statement in the subprogram" . F95 In the third line of the final paragraph of page 207, change "are recursive function references" to "refer to the function itself" . F2K already done [278:11] F95 Page 209 [209:35] 95 Subclause 12.5.2.5 In the last constraint after R1225, change "" to "the in the FUNCTION statement and shall not be the same as the in any ENTRY statement in the subprogram" F2K [280:36]change "" to "the in the FUNCTION statement and shall not be the same as the in any ENTRY statement in the subprogram" F95 Page 212 [212:44] 75 Subclause 12.6 On the penultimate line of page 212, change " " to "intrinsic assignment statement" . F2K [284:15]change " " to "intrinsic assignment statement" . F95 Page 214 [214:28] 18 Subclause 12.7.2 In line 2 of subclause 12.7.2, after "If" insert "there are no actual arguments or" F2K [286:3] after "If" insert "there are no actual arguments or" F95 Page 215 [215:4] F90/204 Subclause 12.7.3 In the second line of the final paragraph of subclause 12.7.3, after "may be the same variable" , add "and may be associated scalar variables or associated array variables all of whose corresponding elements are associated" . F2K [286:18]after "may be the same variable" , add "and may be associated scalar variables or associated array variables all of whose corresponding elements are associated" . F95 Page 219 [219:28+] 9 Subclause 13.6 Add new sentence to the end of the paragraph: " If the MOLD argument to this function is a variable, it need not be defined. " F2K section no longer exists F95 Page 231 [231:16-17] 12 Subclause 13.14.10 In subclause 13.14.10, replace the Result Value paragraph by "*Result Value*. The result is the integer nearest A, or if there are two integers equally near A, the result is whichever such integer has the greater magnitude. " F2K [299:12-13] replace with "*Result Value*. The result is the integer nearest A, or if there are two integers equally near A, the result is whichever such integer has the greater magnitude. " F95 Page 257 [257:30, 32-33, 41] 87 Subclause 13.14.73 Append to line 5 of 13.14.73 "P shall not be zero." In line 7 of 13.14.73, change "If P /= 0, the" to "The" . In lines 7-8 of 13.14.73, delete "If P = 0, the result is processor dependent." F2K [332:11] append "P shall not be zero." [332:13] change "If P /= 0, the" to "The" . [332:13-14] delete "If P = 0, the result is processor dependent." F95 Subclause 13.14.74 Append to line 5 of 13.14.74 "P shall not be zero." . F2K [332:22] append "P shall not be zero." . F95 Page 258 [258:2, 4, 5-6, 21] 87, F90/204 Subclause 13.14.74 In line 2 of page 258, delete "If P /= 0," In line 4 of page 258, delete " If P = 0, the result is processor dependent." In line 5 of page 258, change " If P /= 0, the" to " The" . In lines 5-6 of page 258, delete "If P = 0, the result is processor dependent." F2K [332:25] delete "If P /= 0," [332:27] delete " If P = 0, the result is processor dependent." [332:28] change " If P /= 0, the" to " The" . [332:28-29] delete "If P = 0, the result is processor dependent." F95 Subclause 13.14.75 In the second line of the paragraph that defines the effect of TO, change "and may be the same variable as FROM" to " and may be associated with FROM (12.7.3)" . F2K [333:4] In the second line of the paragraph that defines the effect of TO, change "and may be the same variable as FROM" to " and may be associated with FROM (12.7.3)" . F95 Page 259 [259:9-10] 12 Subclause 13.14.77 In subclause 13.14.77, replace the Result Value paragraph by "*Result Value* The result is the integer nearest A, or if there are two integers equally near A, the result is whichever such integer has the greater magnitude. " F2K [334:5-6]replace the Result Value paragraph by "*Result Value* The result is the integer nearest A, or if there are two integers equally near A, the result is whichever such integer has the greater magnitude. " F95 Page 272 [272:4, 17] 32 Subclause 13.14.110 On line 4 of page 272, change "undefined" to "processor dependent" . On line 17 of page 272, change "undefined" to "processor dependent ". F2K [350:8] change "undefined" to "processor dependent" . [350:21] change "undefined" to "processor dependent" . F95 Page 280 [280:25-26] 85 Subclause 14.1.2.5 In lines 2-3 of 14.1.2.5, replace " the type is accessible ... 14.6.1.3)" by "an entity of the type is accessible in another scoping unit" . F2K already done [53:26-27] F95 Page 288 [288:17-19] 81 Subclause 14.7.1 Replace item (1) with "(1) An array is defined if and only if all of its elements are defined. (2) A derived-type scalar object is defined if and only if all of its nonpointer components are defined. (3) A complex or character scalar object is defined if and only if all of its subobjects are defined." Renumber item (2) as item (4). F2K [409:7]Replace item (1) with "(1) An array is defined if and only if all of its elements are defined. (2) A derived-type scalar object is defined if and only if all of its nonpointer components are defined. (3) A complex or character scalar object is defined if and only if all of its subobjects are defined." Renumber item (2) as item (4). F95 Page 299 [299:4-6] 91 Annex A Delete the glossary entry for present. F2K [423:15-17] delete the glossary entry for present F95 Page 322 [322:38] 97 Subclause C.6.2 In the third line of the example code that starts with the line "CHARACTER (LEN = 20) CH1" replace "SCRATCH" with "OLD" . F2K [454:9] replace "SCRATCH" with "OLD" . F95 Page 325 [325:30] 92 Subclause C.6.5 Change the entry for PAD in the table to: PAD= UNDEFINED YES, NO, or UNDEFINED UNDEFINED F2K table removed