Fortran Main with C I/O

Karl Heuer karl at haddock.ima.isc.com
Wed Oct 3 13:37:44 AEST 1990


In article <1990Oct2.124559.19410 at cunixf.cc.columbia.edu> shenkin at cunixf.cc.columbia.edu (Peter S. Shenkin) writes:
>No one here has mentioned just why or how the POSIX standard mandates that C
>IO can't be used with a Fortran main.
>
>How/why does this limitation arise in POSIX?

POSIX does not mandate any such thing.  The situation is just that one
particular vendor, in the process of providing POSIX support, no longer
allows that particular mixed-language kludge.

The problem is that there is some initialization that needs to be done
before the program starts.  Evidently this is done by the C linkage but not
by Fortran.  If the vendor is committed to supporting the language-mixing
you need, then they ought to be able to put the appropriate hooks into the
Fortran startup as well.

Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint



More information about the Comp.lang.c mailing list