(j3.2006) LEN type parameter
Van Snyder
Van.Snyder
Mon Dec 18 18:28:21 EST 2017
On Mon, 2017-12-18 at 23:23 +0000, Bill Long wrote:
> Interesting test with very inconsistent compiler behavior:
>
> program t03
> type badtype (p5)
> integer, len :: p5
> real (kind=p5) :: x ! X decl line
> integer :: y=p5 ! Y decl line
> end type badtype
> end
>
> Compiler 1: Error for both X and Y lines
> Compiler 2: No errors
> Compiler 3: Error for Y line only
> Compiler 4: (Evidently does not support pdt yet. Every line that includes ?p5? got an error.)
>
> It reduces to whether a LEN type parameter is a constant expression.
> Does not seem to be reasonable to me that it would be.
We should clarify what we want. Maybe the type definition is OK, but
you can't declare any objects of the type with a specification
expression for the value of the type parameter.
> Cheers,
> Bill
>
> Bill Long longb at cray.com
> Principal Engineer, Fortran Technical Support & voice: 651-605-9024
> Bioinformatics Software Development fax: 651-605-9143
> Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
>
>
> _______________________________________________
> J3 mailing list
> J3 at mailman.j3-fortran.org
> http://mailman.j3-fortran.org/mailman/listinfo/j3
More information about the J3
mailing list