(j3.2006) Wording of 7.2.1.2p1(8) is confusing and maybe wrong

Van Snyder Van.Snyder
Thu Mar 12 20:45:20 EDT 2015


7.2.1.2p1(8) says "if the variable is of derived type each length type
parameter of the variable shall have the same value as the corresponding
type parameter of expr unless the variable is allocatable, is not a
coarray, and its corresponding type parameter is deferred."

By applying de Morgan's theorem to "unless," this seems to allow a
length type parameter to have a different value if the variable is not
allocatable, or it is a coarray, or the corresponding type parameter is
not deferred.

If so (I might have read it perversely wrongly), maybe it should be
something like

(8) if the variable is of derived type, and is either a coarray or not
    allocatable, the value of each length type parameter of the variable
    shall be the same as the value of the corresponding type parameter
    of expr, and
(9) if the variable is of derived type, and is allocatable and not a
    coarray, the value of each nondeferred length type parameter of the
    variable shall be the same as the value of the corresponding type
    parameter of the expression.





More information about the J3 mailing list