(j3.2006) Problem with default expressions for kind type parameters?

Malcolm Cohen malcolm
Fri Sep 21 01:55:10 EDT 2012


>A type parameter name in a type definition is a valid primary in a
>constant expression (7.1.12p1(9)).
>
>One need not specify kind type parameter values in the declarations of
>objects of a type if there is a default in the type definition.
>
>There appears to be a problem with this:
>
>  type :: T(J=k+1,K=j+1)

The kind type parameter as a constant expression was meant for component 
definition statements only.  You are right in that it does not say that, and 
that is because the "default value" stuff was added later, indeed at the last 
minute.

Simply changing item (9) to
   "a previously declared kind type parameter of the type being defined"
would work reasonably well.

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 




More information about the J3 mailing list