Xref: utzoo comp.unix.questions:26906 comp.lang.fortran:4089 comp.lang.c:33849 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!uw-beaver!cornell!vax5.cit.cornell.edu!njzy From: njzy@vax5.cit.cornell.edu (T. Joseph Lazio, Cornell University) Newsgroups: comp.unix.questions,comp.lang.fortran,comp.lang.c Subject: Calling C subroutine from FORTRAN Message-ID: <1990Nov14.191142.1016@vax5.cit.cornell.edu> Date: 14 Nov 90 23:11:42 GMT Distribution: comp Lines: 21 Keywords: C subroutine, FORTRAN program, memory allocation I am currently in the midst of converting a program from VMS FORTRAN to UNIX FORTRAN. The program needs to allocate memory. In its VMS form, it uses the call LIB$GET_VM. Unfortunately, the only way to allocate memory on my UNIX machine is to use the call to malloc, which requires some knowledge of C. I have been working on this problem, on and off, for a number of months now and have been rather unsuccessful in my attempts to call a C subroutine from a FORTRAN program. If anybody else has figured out a way to do this, I would appreciate it if you could get in touch with me via e-mail. Thanks. -- Joe -- T. Joseph Lazio Cornell University (607) 255-6420 lazio@astrosun.tn.cornell.edu lazio@pulsar.tn.cornell.edu