(j3.2006) derived types with type parameters are different
Bill Long
longb
Wed Jul 30 12:37:43 EDT 2008
Robert Corbett wrote:
>
> Something like this could be made to work, but it is more difficult to
> do it right than one might expect. For example, would
>
> TYPE T(N)
> INTEGER, KIND :: N
> SEQUENCE
> REAL A(1)
> END TYPE
>
> potentially be the same type as
>
> TYPE T(N)
> INTEGER, KIND :: N
> SEQUENCE
> REAL A(N)
> END TYPE
>
> ?
>
> If so, what does that mean for checking generic interfaces for
> conflicts?
>
When checking a generic interface, the relevant question is about the
types of corresponding dummy arguments among the available specific
interfaces. The dummy argument declarations must have N specified by a
constant. If they are both declared with type(t(1)) then they look the
same. Otherwise, not. Asking whether the types with unspecified N are
the same type is an irrelevant question here.
Cheers,
Bill
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the J3
mailing list