fortran 90 passing user defined type member to a c fucntion
Toon Moene
toon@moene.org
Sat Mar 27 19:42:00 GMT 2010
burlen wrote:
> In my understanding, Fortran unless otherwise instructed is supposed to
> pass by address. In the c function modifying the data pointed to should
> do just that, and be visible to the caller. What I don't understand is
> why passing the member of a user defined type behaves as if it's passed
> by value in this case, while passing the corresponding native type is
> passed by address and works as expected.
Your understanding is ... limited ... (I hesitate to say "wrong",
because lots of Fortran compilers implement argument passing the way you
describe it).
Please direct GNU Fortran questions to the appropriate forum
(fortran@gcc.gnu.org).
Thanks,
--
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.org/~toon/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html
More information about the Fortran
mailing list