[comp.lang.fortran] String passing

rajiv@tuna.cis.ohio-state.edu (Rajiv Agrawal) (08/23/88)

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.

Thanks in advance for any help.

Rajiv.
-=-
------------------------------------------------------------------------------
206 W 18th Ave           INTERNET: rajiv@heron.cis.ohio-state.edu
Columbus, OH 43210                 agrawal-r@eng.ohio-state.edu
(614) 292-9029           BITNET: ts5600@ohstvma   CCnet: 6177::agrawal

rbt@cernvax.UUCP (rbt) (08/30/88)

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`
	=============