(j3.2006) (SC22WG5.3795) N1761, TYPE(*), BIND(C) and arrays

Aleksandar Donev donev1
Tue Dec 9 13:28:49 EST 2008


On Tuesday 09 December 2008 04:24, N.M. Maclaren wrote:

> ! For each of the following calls, is the array passed using
> descriptors ! 
Yes, all of these are passed by descriptors since the dummy is 
assumed-rank.

> or not, why, and where is that stated?
>From N1761:
"A BIND(C) interface may specify dummy arguments that are
assumed-type. If the dummy argument is a scalar, an explicit-shape
array, or an assumed-size array, the corresponding formal parameter in
the C prototype shall be a void pointer (void *).  If the dummy
argument has the ALLOCATABLE or POINTER attributes, or is
assumed-shape or assumed-rank, the actual argument is passed as the C
address of a Fortran descriptor describing the actual argument.
...
A BIND(C) interface may specify dummy arguments that are
assumed-rank. If the dummy argument is assumed-rank, the actual
argument is passed as the C address of a Fortran descriptor describing
the actual argument."

Do I still need to go through the examples? Please do let me know since 
I try to save time by not doing needless work.
Thanks,
Aleks




More information about the J3 mailing list