Calling FORTRAN from C (Was: Need matrix inversion C routine).

Orville Weyrich weyrich at csun1.UUCP
Tue May 9 11:42:26 AEST 1989


>From article <17333 at mimsy.UUCP>, by chris at mimsy.UUCP (Chris Torek):
> It is clear that no one language standard can constrain any *other*
> language, and that therefore no one standard (for Fortran, C, PL/I,
> APL, Lisp, DDL, rog-o-matic, or whatever) can require inter-language
> calls.  It requires an inter-language standard to do this.
> 
> Good luck on getting together an inter-language standard ... you will
> certainly need it.

This has been a topic near and dear to me for a long time: We really should
have some kind of standard for inter-language communication.

Such a standard should be an add-on option to the existing language
standards, and should specify PORTABLE ways of specifying how to call
procedures/functions in other languages.  

If such a standard existed, then vendors would be able to claim that
their language X and language Y compilers met the interface standard, and
procurement personnel would be able specify such compatibility as a
requirement.

It is of course unreasonable to expect to be able to mix-n-match any
arbitrary compilers from arbitrary suppliers.

It is also unreasonable to expect to be able to pass anything between
languages transparently.  For example, if FORTRAN arrays of character
can contain null values, it is unreasonable to expect to be able to
pass such arrays to C, which treats nulls as "end of string". It would,
however, be reasonable to define a standard structure in C which could
be used to communicate string data with FORTRAN routines.

Anyone interested in trying to draft such a standard (which might
include proposed 'tweeks' to the language standards being mingled)?
My own interest would be mainly between FORTRAN and Ada, but I am sure
that there is also interest in linking FORTRAN with C and C with Ada.

E-mail me if you are interested.

Orville R. Weyrich, Jr.      weyrich at csun1.cs.uga.edu


-- 
Orville R. Weyrich, Jr.          | UUCP    : ...gatech!csun1!weyrich
Department of Computer Science   | INTERNET: weyrich at csun1.cs.uga.edu
University of Georgia            |
Athens, GA 30602 USA             | MA BELL : (404) 542-1082



More information about the Comp.lang.c mailing list