(j3.2006) Student misconceptions

Van Snyder Van.Snyder
Fri Sep 12 20:04:09 EDT 2008

At least two newcomers to Fortran 2003 with whom I have recently come
into contact do not realize that type compatibility is not symmetric.

It would be helpful to have a note in to that effect.  Something

        NOTE 4.5a
        Type compatibility is not symmetric.  An entity of an extension
        type is not type compatible with an entity of a type of which it
        is an extension.  An entity that has a declared type is not type
        compatible with an unlimited polymorphic entity.

Those same two students thought they had to declare associate names to
get them to have the correct type, kind, rank and bounds, as is
necessary for statement function dummy arguments and FORALL induction
variables, even though and are quite explicit.  Perhaps
they missed the last two sentences of, the topic of which
should arguably be in  Moving those sentences to be after the
first sentence of is a reasonable solution.

This confusion is perhaps abetted by not stating in that
entities from the scope containing the SELECT TYPE or ASSOCIATE
construct that have the same name as an associate name are not
accessible within the construct by that name (just like the case of host
association).  It does say so in 16.4p2.  A note after
something like the following might solve the problem:

        NOTE 16.10a
        Within the construct, an entity identified by a global or
        local name that is the same as an associate name is not
        accessible by that name (16.4).

More information about the J3 mailing list