(j3.2006) 08-267

Jim Xia jimxia
Tue Sep 23 23:18:51 EDT 2008

j3-bounces at j3-fortran.org wrote on 09/23/2008 10:48:38 PM:

> This means we should prohibit
>   class(my_type), intent(in) :: x[*]
>   select type ( x )
>   type is ( my_extension )
>     print *, x[1]%extra_stuff
>   end select
> because the dynamic type of X might be different from the type of
> X[1].  Or... we should prohibit SOURCE= and MOLD= for coarray

Hmm..., I don't even understand what this code fragment means: the
associate name, x, in the select type construct is revering to a local
variable, and it says if it is my_extension, then refers to extra_stuff on
image 1?  I think we should prohibit coindexed objects with base-object
being associate name.

> The problem is that without being able to reference coindexed
> polymorphic objects, e.g. as
>   select type ( x=>x[1] )
>   type is ( my_extension )
>     print *, x%extra_stuff
>   end select
> and without SELECT TYPE as above, the only components that can be
> accessed are those of the declared type.  So we might as well
> prohibit declaring polymorphic coarrays.

The restriction probably is not needed.  You can achieve the same effect
using coarray dummy arguments, which normally is more efficient than using
coindexed objects.  On the other hand, I have no objection to disallow
polymorphic coarrays:-)


Jim Xia

RL Fortran Compiler Test
IBM Toronto Lab at 8200 Warden Ave, Markham, On, L6G 1C7
Phone (905) 413-3444  Tie-line 313-3444
email: jimxia at ca.ibm.com
D2/YF7/8200 /MKM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://j3-fortran.org/pipermail/j3/attachments/20080923/4ec2e108/attachment-0001.html 

More information about the J3 mailing list