From: Kevin G. Rhoads on
>When sending integers from C to the fortran DLL function, it always
>recieved 0.
>When sending references to integers from C to the fortran DLL
>function, it always recieved the same number, regardless of which
>integer originally sent

That is because C is passing by value and Watcom F77 is passing by
reference (i.e., effectively a pointer to the value).

You can override behaviour with pragmas (non-portable) or declare
the C stuff with * on the args so that is sends and receives pointers,
which will work with F77 in Watcom (and many other compilers).

THe Watcom Help and examples will provide details for pragmas and
for mixed language declarations.
First  |  Prev  | 
Pages: 1 2
Prev: Fortran novice
Next: Incorrect values calling F from C