[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I need help with a fortran foreign function problem.
- To: LANGSYS@applelink.com, email@example.com
- Subject: I need help with a fortran foreign function problem.
- From: firstname.lastname@example.org (Rob Browning)
- Date: Sat, 26 Feb 1994 15:13:34 -0600
I have defined the following _simple_ fortran subroutine:
real*8 function square(x)
square = x*x
I compiled this to the file Simple.f.o with Language Systems Fortran.
Then, in MCL I executed the following
(defffun (square "SQUARE")
((double-float :double :by-reference))
Both of these statements execute without a hitch. However when I call the
function, I get some strange results:
? (square 3.0)
Can anyone explain how I can get the subroutine's return value properly. I
have succeeded in calling other subroutines and passing arguments by
reference to compute values, but I would like to be able to use functions
I wasn't sure if my problem was on the MCL side or the Fortran side...