Numeric Data Types
Normally, passing numeric data does not present a problem. The most important thing to keep in mind when passing numeric types is that in Win32, the C int type is 4 bytes, not 2 bytes, and therefore is equivalent to the Fortran INTEGER*4 type. The COMPLEX type is a special case and is discussed in a later section. The following table summarizes equivalent numeric data types for Fortran, MASM, and C/C++.
Equivalent Fortran, MASM, and C/C++ Numeric Data Types
|(none)||DWORD||unsigned long, unsigned int|
|INTEGER, INTEGER*4||SDWORD||long, int|
|DOUBLE PRECISION, REAL*8||REAL8||double|
If a C program passes an unsigned data type to a Fortran routine, the routine can accept the argument as the equivalent signed data type, but you should be careful that the range of the signed type is not exceeded.