(j3.2006) 07-276r1
Aleksandar Donev
donev1
Mon Oct 1 23:40:27 EDT 2007
Malcolm Cohen wrote:
> Just what C variable is
> REAL,BIND(C,NAME='fred') :: x[10,*]
> meant to interoperate with?
A simple float scalar with name fred and external linkeage.
> i.e. the problem is not limited to dummies, it is completely analogous
> to ALLOCATABLEs, and we solved it for ALLOCATABLEs by not making them
> interoperable too.
No, it is not "completely analogous" to ALLOCATABLEs, IMO, and the
opinion of others that discussed it in subgroup and voted it in.
Co-arrays are meant to be exactly identical to ordinary arrays in a
local context, including having the same physical representation. This
is not true of ALLOCATABLE arrays, which have a unique physical
representation (e.g., descriptors).
> That would be technically wrong then.
I have not seen anything "technically wrong" with it. Does it not work
for some reason? Or is the objection phillosophical in the sense that it
is more about the meaning of "interoperable" and whether it can apply to
co-arrays. I am more concerned with pragmatic aspects, such as whether
some functionality is taken away.
> Looking at the words for C_LOC, I don't see anything that would be
> affected by coarrays not being interoperable. It says it has to be
> contiguous or scalar, and have interoperable type and type params.
OK, I'll agree with this. I think that only leaves global variables like
your example above. It is of less importance, so I could go either way...
Aleks
More information about the J3
mailing list