J3/02-248r1 Date: 2002 August 13 To: J3 From: Walt Brainerd and Brian Smith Subject: Initialization expressions Fortran parameters are very important to scientific and numerical programming, in which it is necessary to have values that are both global and constant, to ensure that they are consistent throughout the program, regardless of context, and are not modified. However, parameters are second-class citizens in that you can't use many of the powerful intrinsic functions when computing an initial value of a variable or the value of a parameter. This proposal allows cosines, logarithms, and other such intrinsic functions in initialization expressions. The counter argument that a compiler should not be required to access the entire math library no longer seems relevant with the use of dynamically linked libraries and only those functions referenced are accessed. The counter argument of inconsistent results when cross compiling is much less severe with the adoption of IEEE standard arithmetic. However, people that do numerical computing have always had to adjust to getting slightly different results when the same mathematical expression is computed in different contexts (e.g., I/O and assignment), and this will be no different. Proposal (TECHNICAL CHANGE): 128:25-26 Delete ", the exponentiation ... power," 129:4-14 Replace with (4) A reference to an elemental standard intrinsic function, where each argument is an initialization expression, 129:NOTE 7.11 Delete 129:15-17 Replace with (5) A reference to a transformational standard intrinsic function other than NULL, where each argument is an initialization expression, 129:18-23 Interchange items (6) and (7). 130:NOTE 7.12 Add new examples after DIGITS (X) + 4: 4.0 * atan(1.0) ceiling(number_of_decimal_digits / log10(radix(0.0))) Delete last four lines ========================================================== Here are the references to "initialization expressions": Page Line xiii 24 Fourth line of item (4) 18 24-28 31 24 32 10,15,21 41 31 42 38 46 12,15 47 5-22 Section 4.5.1.2 49 6+ NOTE 4.28 49 9 58 39 59 18-19 63 12 64 3-12 70 16,22,23 71 12,14,15,19,20,21,29 72 21, NOTE 5.4, 26 73 1-9,10,12 74 24-30,35 78 4-5 79 7-11 80 26 81 9 82 22 83 line 16 of NOTE 5.17 84 15 88-90 Section 5.2.5 92 Section 5.2.9 97 27 98 Note 5.41, last sentence 100 12-13 102 17-18 113 NOTE 6.19 128 All of Section 7.1.7 160 27-29 189 12