Skip to content
Prev 31297 / 63424 Next

Use of cfortran.h?

All you need to do is to write a fortran-callable wrapper for a C 
interface: there are F77_* macros to allow this.  They do not work on 
every possible platform, but they work on the platforms R runs on 
(since building R relies on them).

E.g. intpr (a call to R's print routines from Fortran) provides a good 
prototype.  It is in src/main/xxxpr.f an print.c (it would be simpler 
if Fortran character types were not involved).

I don't suppose you are comtemplating complex variables, but if you 
were, a great deal of care is needed in the C/Fortran interfaces.
On Fri, 6 Feb 2009, nashjc at uottawa.ca wrote: