To: J3 10-107 From: John Reid Subject: Comment GB-3 Delete arithmetic IF Date: 2010 February 01 References: WG5/N1802, WG5/N1803, J3/09-007r3 DISCUSSION The arithmetic IF should be deleted in order to help reduce redundancy in the language. It was classed as obsolescent in Fortran 90 and in subsequent standards. The words in 8.2.4, Execution of an arithmetic IF statement causes evaluation of the numeric expression followed by a branch. The branch target statement identified by the first label, the second label, or the third label is executed next depending on whether the value of the numeric expression is less than zero, equal to zero, or greater than zero, respectively. are incorrect when the expression has a NaN value since this is not less than zero, not equal to zero and not greater than zero. If required in a standard-conforming program, the statement can trivially be replaced with an IF-construct, using a preprocessor. Note: If this proposal is not accepted, the following edits will be needed 8.2.4: Define the meaning as that of the equivalent IF construct. 1.7.1: Correct the words that refer to vertical format control. [4:39] "arithmetic IF statement," should be in tiny font. EDITS [4:39]In 1.3.18 branch target statement, delete "arithmetic IF statement," [25:24-25] In 1.7.2 Nature of deleted features, replace the second sentence by "The arithmetic IF statement was obsolescent in Fortran 95 and Fortran 2003. Vertical format control was deleted from Fortran 2003 because its purpose was to support hardware that was no longer in use. The other deleted features were not included in Fortran 95 or Fortran 2003. None is included in this revision of Fortran." [30:8]In 2.1 High level syntax, R214 action-stmt, delete <> [54:17]In 4.4.2.3 Real type, para. 3, add "and" at the end of the first bullet point, delete ", and" at the end of the second bullet point, and delete third bullet point [174:22]In 8.1.6.3 Form of the nonblock DO construct, C818, delete "," [174:35]In 8.1.6.3 Form of the nonblock DO construct, C816, delete "," [186:16]In 8.2.1 Branch concepts, delete "an arithmetic IF statement," [186:35 to 187:4] Delete the whole of 8.2.4 Arithmetic IF statement. [465:34+] In B.1 Deleted features, add new item to end of list: (7) The arithmetic IF statement In Fortran 66, Fortran 77, Fortran 90, Fortran 95, and Fortran 2003, execution of an arithmetic IF statement caused the evaluation of a numeric expression followed by a branch. The branch target statement identified by the first label, the second label, or the third label was executed next depending on whether the value of the numeric expression was less than zero, equal to zero, or greater than zero, respectively. The effect can be achieved with an IF construct. [Note to Editor: "Fortran 66, Fortran 77" should be in small upper case.] [466:6] In B.2 Obsolescent features, B.2.1 General, delete item (1) in the list and renumber the rest.