4. C-Fortran interfaces#

In definition.h, many macros are defined in order to avoid errors when passing arguments between C and Fortran.

For example:

#define CALL_JEEXIN (a, b) CALLSP (JEEXIN, jeexin, a, b)

This allows you to call from C the Fortran JEEXIN subroutine whose first argument is a character string (S) and the second a pointer (P) to an integer or a real number.

The advantage is that depending on the platform, you may or may not add a “_” at the end of the subroutine name. Likewise, it may be necessary to pass the length of the character string just after the variable or in the last position.

NB: following the transition to Fortran 90, we could improve the passage of character strings.