(j3.2006) (SC22WG5.4370) [ukfortran] WG5 informal ballot re Interop. TR

Aleksandar Donev donev
Mon Dec 6 08:41:46 EST 2010


On 12/6/2010 5:31 AM, Malcolm Cohen wrote:

> Inclusion of the type field in the descriptor
> should probably be reconsidered.
I in principle agree but I also deel that going around in circles and 
never converging should be avoided.

> A reasonable alternative would be to
> forbid passing TYPE(*) actuals to TYPE(*) dummies.
This is too drastic. We want to disallow TYPE(*) assumed-shape or 
explicit-shape dummies (that is, ones that do not carry a descriptor) to 
be passed as actuals for TYPE(*) dummies. That way, we ensure that type 
information is always present. One can still write wrappers in Fortran 
that have TYPE(*) dummies, but they will always be assumed rank. C 
routines on the other hand can avoid descriptors, but can also rely on 
having type information.

Does this seem acceptable?

> If we go for the "forbid" route, I hope
> that we can pass CLASS(*) actuals to TYPE(*) dummies - and that if this
> ends up in a C descriptor that the descriptor fields "type" (if we keep
> that) and "elem_size" (and "length" if we get that) are set
> appropriately. In fact I think we can do that anyway as the TR stands.
Yes, CLASS(*) or in fact any polymorphic thingo that already carries a 
hidden type descriptor could be allowed as an actual argument 
corresponding to a TYPE(*) dummy. But we need to decide this and put it 
in writing in the TR.

Best,
Aleks

-- 
Aleksandar Donev, Assistant Professor of Mathematics
Courant Institute of Mathematical Sciences
Office: 909 Warren Weaver Hall, New York University
E-mail: donev at courant.nyu.edu
Phone: (212) 992-7315; Fax: (212) 995-4121
Mailing address: 251 Mercer St, New York, NY 10012
Web: http://cims.nyu.edu/~donev



More information about the J3 mailing list