Xref: utzoo comp.sys.dec:767 comp.lang.fortran:1009 comp.lang.c:12253 Path: utzoo!attcan!uunet!mcvax!cernvax!rbt From: rbt@cernvax.UUCP (rbt) Newsgroups: comp.sys.dec,comp.lang.fortran,comp.lang.c Subject: Re: String passing (was :Re: Problem calling a C function from Fortran Keywords: Fortran, C, external function in Fortran Message-ID: <809@cernvax.UUCP> Date: 30 Aug 88 13:15:32 GMT References: <1134@ssc-bee.ssc-vax.UUCP> <353@sdrc.UUCP> <20518@tut.cis.ohio-state.edu> Reply-To: rbt@cernvax.UUCP () Organization: CERN European Laboratory for Particle Physics, CH-1211 Geneva, Switzerland Lines: 20 In article <20518@tut.cis.ohio-state.edu> rajiv@tuna.cis.ohio-state.edu (Rajiv Agrawal) writes: >While on the subject of C and FORTRAN on VMS ... How does one pass >strings between the two compilers??? We have VAX FORTRAN and GnuC >compilers. I just cannot pass any strings between a C routine and a >FORTRAN routine. The problem is that FORTRAN programs use the CLASS_S descriptor mechanism while C modules have zero terminated strings by default. The best way to solve your problem is described in chapter "Using VAX C Features on VMS" of "Guide to VAX C" manual. It describes how function parameters must be declared to be conformant to the CLASS_S descriptor class. The only problem in doing this is that ALL the modules calling the C routine MUST have their parameters defined as CLASS_C descriptor, otherwise... Roberto Divia` =============