Damian <damian@[EMAIL PROTECTED]
> wrote:
> On Jul 24, 10:50 am, Tobias Burnus <bur...@[EMAIL PROTECTED]
> wrote:
> > Hello,
> >
> > Assume the following Fortran 2003 source:
> >
> > MODULE M
> > TYPE MOD_T
> > INTEGER :: I
> > END TYPE MOD_T
> > END MODULE M
> >
> > use m, only: local => mod_t
> > type, extends(local) :: my_t
> > end my_t
> > type(my_t) :: my
> >
> > Does "my" contain "my%local" or "my%mod_t" ?
> >
> > According to NAG f95 it is "my%mod_t"...
> >
> > "The parent type of an extended type is the type named in the EXTENDS
> > attribute specification."
> > "NOTE 4.49 The name of the parent type might be a local name
> > introduced via renaming in a USE statement."
> > "An extended type has a scalar, nonpointer, nonallocatable, 1 parent
> > component with the type and type parameters of the parent type. The
> > name of this component is the parent type name."
> >
> > Tobias
>
> For what it's worth, the IBM compiler interprets it the same way as
> the NAG compiler. I'll be interested to hear from those who know the
> standard well enough to respond to your question.
Seems to me like the material you quoted makes it pretty explicit that
it should be the local name - that is to say that both compilers are
wrong. I would have thought that's exactly what the note was trying to
clarify. I can't see what else the note would be saying. Surely there
wouldn't be a note just to say that you can use a local name? That seems
obvious enough that if one doesn't get that, one probably needs a whole
lot more help than just the note. I would have thought that the note was
to clarify that when you use the local name, that is the "name of the
parent type" that is referred to elsewhere.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain


|