Quantcast
Channel:
Viewing all articles
Browse latest Browse all 10

I don't think your example

$
0
0

I don't think your example explains well enough what you're trying to do.  I doubt that you really want to see a C_PTR to an unassociated Fortran pointer.  I'm surprised that you don't get complaints about trying to allocate something not declared as allocatable.  Once you have allocated a data region (which has to be declared with TARGET attribute, although ifort probably doesn't enforce it), you can use C_LOC to make a C_PTR to it.

If you return a pointer to a derived type containing Fortran pointers, there will be no portable way to make use of those pointers in C.  You would have to write C code to interpret the descriptor as it is used internal to ifort.


Viewing all articles
Browse latest Browse all 10

Trending Articles