(j3.2006) TRANSFER
Bill Long
longb
Fri Dec 3 16:37:57 EST 2010
On 12/3/10 1:20 AM, Robert Corbett wrote:
> An engineer at Oracle recently asked me if the actual
> argument passed to the argument MOLD of the intrinsic
> function TRANSFER can be polymorphic. If so, he wanted
> to know if the declared type should be used or the
> dynamic type. I searched Clause 13 for the answer, but
> I found nothing. I told him to assume that it is allowed,
> and that the declared type should be used. Did I miss
> something in the standard that answers his question?
>
Generally, the convention is that "type" of an object, without either
'dynamic' or 'declared' modifier, means its dynamic type. In this
particular case, that would seem to make the most sense anyway.
Typically, you would write
x =transfer(y, MOLD=x)
and you want the bits of the actual object x to be the bits of y for the
type of x at that particular point in the program's execution (which is
the definition of dynamic type).
Cheers,
Bill
> Bob Corbett
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc./Cray Plaza, Suite 210/380 Jackson St./St. Paul, MN 55101
More information about the J3
mailing list