Xref: utzoo comp.lang.c:36178 comp.lang.fortran:4775 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!charon!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.lang.c,comp.lang.fortran Subject: Re: mixing fortran and c Message-ID: <2952@charon.cwi.nl> Date: 15 Feb 91 23:18:53 GMT References: <160@mailgzrz.tu-berlin.de> Sender: news@cwi.nl Followup-To: comp.lang.c Organization: CWI, Amsterdam Lines: 18 In article <160@mailgzrz.tu-berlin.de> duns1222@w203zrz.zrz.tu-berlin.de (Martin Dunschen) writes: > Hi all you high experienced C/FORTRAN programmers ! Do I qualify? > > But the last remaining thing is: > HOW TO PASS STRINGS ? > The only general answer is that the Fortran routines should not look at the parameters as strings, but as character array's (i.e. to determine the number of characters the routine should loop through the array searching for a terminator, which is not provided automagically in Fortran). If this does not satisfy you, more information is required: platform, fortran compiler. The answer can range from simple to impossible. (E.g. on Alliant systems Fortran passes the lengths of strings as parameter numbers -1, -2, etc.) -- dik t. winter, cwi, amsterdam, nederland dik@cwi.nl