J3/00-128 Date: 28th February 2000 To: J3 From: Malcolm Cohen Subject: Unresolved issue 132 1. Introduction Richard says "If f95 we allow "constant specification expressions" in certain situations where evaluation at compile time is requiired. This is confusing and unhelpful: (1) Compile-time evaluation is the purpose of INITIALIZATION expressions (2) If we require all compilers to evaluate them at compile time, why not let the user put them into PARAMETERS. I found the expression categorization of Fortran 90 to be very confusing. Its getting worse." I concur (except for the last sentence - I think we are making progress!). The solution is to delete constant specification expressions entirely, replacing their use by initialisation expressions. There is an outstanding interpretation request on this issue (whether we intended to write "constant specification expressions" instead of "initialization expressions"). However, whichever way the interpretation goes we should make our compile-time evaluation requirements consistent; that is, we should delete "constant specification expressions" and if any change is needed to initialisation expressions to accommodate the outcome of the interpretation we can do it then. We really ought to do this now, rather than trying to clean up the mess in 2 years time. The edits below delete "constant expression" as well, because after fixing the places where it ought to have read "initialization expression", there are no longer any occurrences of "constant expression" in the document. These edits are marked "CE:" in case someone is worried about it. 2. Edits to 00-007 {No need to fix array components since automatic array components are allowed.} {No need to fix character components for the same reason.} [65:12-15] Replace with "Constraint: If the VALUE attribute is specified for a dummy argument of type character, the length parameter shall either be specified by an initialization expression with the value of one, or not be specified." {Issue 89. Should this not be a constraint on the BIND attribute though?} [65:16-27] Delete the J3 note. [66:7] Replace "may be a nonconstant expression provided" with "shall be an initialization expression unless". {It might be better to phrase this as when an initialization expression is required rather than the reverse; probably shorter too, if I only knew.} [66:9-10] Delete "If ... expression." {Now covered because it is an initialization expression.} [66:10-11] Replace "such a nonconstant expression" with "a that is not an initialization expression". {Fix the definition of an automatic object.} [66:16] Replace "a nonconstant expression" with "an expression that is not an initialization expression". {Fix evaluation time for character length} [68:43] Change "a constant specification" to "an initialization". {Fix statement function character lengths} [73:27] Change "nonconstant specification" to "not initialization". {Fix automatic array definition} [73:28] Change "nonconstant specification" to "not initialization". {Fix evaluation time for explicit-shape array bounds} [75:27] Change "nonconstant specification" to "not initialization". {Fix evaluation time for assumed-size array bounds} [91:7-8] Delete. {This constraint said, of common block objects with an in the COMMON statement: "Each bound in the shall be a constant specification expression (7.1.6)." This is redundant because it is already covered by [91:1-5] "A shall not be ... an automatic object ...". It is better to delete the redundant constraint than it is to fix it.} [118:32] Change "Constant" to "Initialization". {CE: After we delete the definition of constant expression, the section is about initialization expressions only.} [118:33-119:9] Delete. {CE: Delete the definition of "constant expression".} [119:10-13] Delete. {There are zero references to "character constant expression" et al anywhere in the entire document.} [119:14] Delete. {No longer any need to define "constant specification expression".} [119:15-28] Delete the J3 note. [244:17-18] Replace "expression ... entities" with "not an initialization expression, the exact dependence on the entities in the expression". {This text was wrong both grammatically (missing article, non-correspondance of nouns) and technically (it made the dependence on KINDs into a characteristic, which it ought not to have done). I may raise an interp about this, but no need to avoid fixing the mistakes immediately.} [244:29] Replace "a constant" with "an initialization". {Fix characteristics of function results.} [395:37-38] Delete. {CE: The glossary entry for "constant expression".} ===END