7.4.2. Argument passing conventions
7.4.2 Argument passing conventions
Subroutines do not return a value (matching C99's void
) while functions either return a value as specified in the platform ABI or the result variable is passed as hidden argument to the function and no result is returned. A hidden result variable is used when the result variable is an array or of type CHARACTER
.
Arguments are passed according to the platform ABI. In particular, complex arguments might not be compatible to a struct with two real components for the real and imaginary part. The argument passing matches the one of C99's _Complex
. Functions with scalar complex result variables return their value and do not use a by-reference argument. Note that with the -ff2c
option, the argument passing is modified and no longer completely matches the platform ABI. Some other Fortran compilers use f2c
semantic by defaul