Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!hub.ucsb.edu!ucsbuxa!3003jalp From: 3003jalp@ucsbuxa.ucsb.edu (Applied Magnetics) Newsgroups: comp.lang.fortran Subject: Re: Calling FORTRAN routines from C Keywords: Unwanted conversions for single-precision return values Message-ID: <7800@hub.ucsb.edu> Date: 12 Dec 90 22:12:22 GMT References: <6928@uceng.UC.EDU> Sender: news@hub.ucsb.edu Lines: 19 In article <6928@uceng.UC.EDU> dmocsny@minerva.che.uc.edu (Daniel Mocsny) writes: > [problems recovering a Fortran function value from a C program.] That's a new one. My own C-Fortran chimeras always give me trouble with the following: -I/O. The C and Fortran I/O subsystems may interfere. Do all I/O in the same language or else... -Common blocks. There may be no way to get at a common block from C. The documentation is not always complete or clear in these two areas. "Ordinary" function and subroutine calls usually work. Needless to say, all this is system-dependent. I guess I can add function calls to my watch list. In the case at hand, subroutine calls seem to work. You can always write a Fortran subroutine through which you will call the Fortran function from C. --Pierre Asselin, R&D, Applied Magnetics Corp. I speak for me.