Interlanguage Calls - Function Return Values
Functions pass their return values according to type:
- Pointers, enumerated types, and integral values (int,
short, long, char,
and unsigned types) of any length are returned,
right-justified, in R3; long long values
are returned in R3 and R4.
- floats and doubles are
returned in FP1; 128-bit long doubles
are returned in FP1 and FP2.
- Calling functions supply a pointer to a memory location
where the called function stores the returned value.
- long doubles are returned in R1 and R2.
![](../../images/ngrelt.gif)
Interlanguage Calling Conventions
Corresponding Data Types
Using the Subroutine Linkage Conventions
in Interlanguage Calls
Sample Program: C Calling Fortran