Calling C Procedures from an Intel Fortran Program

Naming Conventions

By default, the Fortran compiler converts function and subprogram names to upper case. The C compiler never performs case conversion. A C procedure called from a Fortran program must, therefore, be named using the appropriate case. For example, consider the following calls:


The C procedure must be named PROCNAME.


The C procedure must be named FNNAME

In the first call, any value returned by PROCNAME is ignored. In the second call to a function, FNNAME must return a value.

Passing Arguments Between Fortran and C Procedures

By default, Fortran subprograms pass arguments by reference; that is, they pass a pointer to each actual argument rather than the value of the argument. C programs, however, pass arguments by value. Consider the following: