mixing fortran and c

Richard A. O'Keefe ok at goanna.cs.rmit.oz.au
Mon Feb 18 18:46:59 AEST 1991


In article <160 at mailgzrz.tu-berlin.de>, duns1222 at w203zrz.zrz.tu-berlin.de (Martin Dunschen) writes:
> Hi all you high experienced C/FORTRAN programmers!
> 
> We have a problem which is probably solved by some of you.
>       HOW TO PASS STRINGS ?

The answer is "it depends".  Which C are you using and which Fortran?
For UNIX, AEGIS, and VMS, the answer is in (Fortran documentation,
C documentation, C documentation) -- from memory.  (Yes, the answer
really is there in a complete UNIX documentation set.  Or use f2c.)
The usual technique in UNIX is to pass an extra int parameter for each
character*(_) variable giving the length for that variable, after
all the other parameters. 
-- 
Professional programming is paranoid programming



More information about the Comp.lang.c mailing list