(j3.2006) kind conversion for intent(in), value dummy arguments
Bill Long
longb at cray.com
Mon Sep 15 19:17:14 EDT 2008
Craig Rasmussen wrote:
> An issue has come up in defining MPI 3.0 Fortran interfaces. If the
> dummy argument is declared as,
>
> integer(C_INT), intent(in), value :: count
>
> can an actual argument of a different kind always be associated with
> the dummy declared above?
No. As Aleks says, type and kind matching is still required.
> Section 12.5.2.3 paragraph 4 states that:
>
> A present dummy argument with the VALUE attribute becomes argument
> associated with a definable anonymous data ob ject whose initial value
> is the value of the actual argument.
>
> It seems to me that if the anonymous data object is allowed to be
> assigned/defined with a different kind than is actually is, that then
> the argument association can proceed without a problem.
>
> If the above were allowable, the MPI routines could be declared with
> integer(C_INT) dummies, but existing codes would not have to change.
This part I don't understand. If current codes are calling MPI routines
with the wrong kind of integer arguments, they are broken, right? Do
people actually do this?
Cheers,
Bill
>
> Regards,
> Craig
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the J3
mailing list