String passing (was :Re: Problem calling a C function from Fortran
rbt
rbt at cernvax.UUCP
Tue Aug 30 23:15:32 AEST 1988
In article <20518 at tut.cis.ohio-state.edu> rajiv at 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`
=============
More information about the Comp.lang.c
mailing list