Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!ames!elroy!cit-vax!ucla-cs!zen!ucbvax!ucsfcgl!fauman From: fauman@cgl.ucsf.edu (Eric Fauman%Stroud) Newsgroups: comp.lang.c Subject: calling a fortran routine from C Message-ID: <10513@cgl.ucsf.EDU> Date: Fri, 20-Nov-87 15:31:09 EST Article-I.D.: cgl.10513 Posted: Fri Nov 20 15:31:09 1987 Date-Received: Sun, 22-Nov-87 18:51:59 EST Organization: UCSF Computer Graphics Lab Lines: 24 Summary: how can you get a string back from a fortran routine I am writing some C code now in which I need to use some fortran library routines. One routine has a dozen arguments; ints, floats, arrays, and strings. I can send and receive ints and floats perfectly well (passed by address, of course) and I can send strings also by putting the necessary information in a descriptor structure. However, when I try to get a string back, I get back garbage. The string pointer in the descriptor points off into space. What do I need to do to get back a string. To recap: I am passing a pointer to a descriptor. I had hoped the fortran would change the contents of the descriptor I had sent, and it does, but it changes it into something I can't interpret. I can't change the fortran code. I am dealing with passed parameters, not RETURNed values. Thanks in advance, Eric Fauman |Fauman@cgl.ucsf.edu University of California San Francisco Expires: Sender: Reply-To: fauman@cgl.ucsf.edu.UUCP (Eric Fauman%Stroud) Followup-To: Distribution: comp.lang.c Organization: UCSF Computer Graphics Lab Keywords: