Except for arguments that are character strings, Fortran and C pass arguments in the same order. However, for every argument of character type, the Fortran routine passes an additional argument giving the length of the string. These are long int quantities in C, passed by value.
The order of arguments is:
Address for each argument (datum or function)
A long int for each character argument (the whole list of string lengths comes after the whole list of other arguments)
Example:
This Fortran code fragment: |
Is equivalent to this in C: |
||
---|---|---|---|
|
|