J3/15-101r2 To: J3 Subject: Wart removal proposal -- Specification expressions From: Van Snyder & Malcolm Cohen Date: 2015 February 25 1. Introduction =============== The question whether such things as integer :: B = bit_size(B) are permitted or prohibited has recently recurred on comp_lang_fortran. Interp F95/000090 included the above example, and several others, including character :: C(20)*(size(C,1)) The answer to the interp was that both of these declarations (and several additional examples) were not intended to be conforming. This resulted in 7.1.11p8, which says, in part "The prior specification may be to the left of the specification inquiry in the same statement, but shall not be within the same ..." which is somewhat ambiguous: It is reasonable that the extents of an array might not be established before before a is examined, as in the second example, but certainly one knows the type and type parameters before processing any in the statement. I.e., is the bit size specified by the or the ? 2. Specification ================ Allow any constant properties of an object to be referenced within an in its . This would allow such things as integer :: B = bit_size(B) real :: E = sqrt(sqrt(epsilon(E))) integer :: Iota(10) = [ ( i, i = 1, size(iota,1) ) ] 3. Syntax ========= The proposal is germane to R503 and R505 , but no syntax rules are changed. 4. Edits ======== [xviii] Introduction, p2, add new bullet at the beginning of the list "- Data declaration Constant properties of an object declared in its can be used in its .". [156:30] 7.1.12 Constant expression, p2 Append to the end of the sentence: "unless the specification inquiry appears within an .". ===END===