Using C procedures in a Fortran code
COMPUTING-BLOG
Scientific Computing Fortran C/C++
Notebook
Here I described the inter-operability between C and Fortran.
Common terminology The global framework to call methods/functions from one language in other is named: foreign function interface (FFI), and the process binding. Nowadays, this is a commom procedure to use libraries that we need but are not yet developed for our prefered language.
The interoperability is possible in Fortran 2003 as it incorporates an specific module called ISO_C_BINDING that ensures a correct use of the C intrinsic types.
Also we can have a interoperability of derived types:
with the above code we can inter-operate with a typical C code:
However, we can also have a procedure inter-operations. For example in Fortran we can make,