The following message is a courtesy copy of an article
that has been posted as well.
I'd like to write some Matlab and Numeric Python
extensions using Fortran90, and therefore am looking for
the best way to pass a C pointer into an
F90 function and have it represented as a (say)
3 dimensional F90 array. I've taken a look
at William Mitchell's Opengl bindings (http://math.nist.gov/f90gl),
which declare F90 arrays as, for instance:
integer(kind=glint), dimension(*) INTENT_IN lists
My F90 book stresses how limited the lists array is (can't pass it to
intrinsic functions, no 3-d subscripting, etc.) Obviously I could
copy lists' data into a new F90 array, but would prefer a solution
that avoids the allocation and the copy. I'd appreciate any examples,
portable or not, but am most interested in Sun's F90 compiler. I'll
also need to go the other way (i.e. return a C pointer to
lists' data).
Thanks, Phil
--
------------------------------------------------------------
Phil Austin ([log in to unmask])
Department of Geography, Tel: (604) 822-2663
University of British Columbia, B.C. Fax: (604) 822-6150
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|