Is it possible to call an F90 routine from C (or C++) code? I think
there could be trouble passing vector or array arguments. What I'd
like is something like:
In the C code
int ai[100];
void f90_foo(int *);
/* call f90 */
f90_foo(ai);
In the F90 code
subroutine f90_foo(ai)
integer, dimension(:) :: ai
! Perform some array operation, e.g.
ai = cshift(ai,1)
return
end subroutine f90_foo
Is there any way to make something like this work? If I pass the
array size, does that help? It would be most useful if there was a
platform independent way to do this.
Thanks,
-robert ferrell
--
========================================================================
Robert C. Ferrell, PhD E-mail: [log in to unmask]
Massachusetts Institute of Technology MIT Office: (617) 253-3961
Cambridge Power Computing Associates, Ltd. CPCA Office:(617) 734-8569
========================================================================
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|