[J3] Question on component definition statement in a derived type involving a length-type parameter along with (apparently) constant expression
Vipul Parekh
parekhvs at gmail.com
Tue Aug 7 13:14:41 EDT 2018
On Tue, Aug 7, 2018 at 12:21 PM Steve Lionel via J3
<j3 at mailman.j3-fortran.org> wrote:
>..
> Referencing 10-007: 4.2p5 says, "A length type parameter may be used in
> specification expressions within the derived-type definition for the
> type, but it shall not be used in constant expressions."
>
> So, no, this is not standard conforming.
> ..
As explained by Van, by that token, one should not be able to define a
component as, say, x(N) but that's clearly not the case - it would
make the length-type parameter of a derived type useless. I was
referring to the "specification inquiry reference" which as L(..)
should be a constant expression similar to N or N+1, etc.
Thanks,
Vipul
More information about the J3
mailing list