length of character argument returned Fortran -> C ?

Frank Filthaut ffilthau@mail.cern.ch
Sun Oct 3 03:47:00 GMT 1999


  Hi,

my apologies if this is a FAQ - I did not find the answer.

I'm having a C program (C++ in fact) which calls a Fortran routine.
The Fortran routine gives back a character string. Now when a
character string is passed as _input_ to a Fortran routine, one has
to give an additional (int) argument specifiying the length of the
string. However, how does this work with a string being returned?
I found that the integer argument is mandatory also in this case, but
this does not give me the length of the string. Do I have to find out
the length by hand afterwards?

                         Regards
                     Frank Filthaut



More information about the Gcc-help mailing list