Calling FORTRAN from C (Was: Ne

Mark A. Heilpern heilpern at ibd.BRL.MIL
Sat Jun 3 03:40:22 AEST 1989


In article <8905181540.AA06912 at cartier.dgp.toronto.edu> flaps at dgp.toronto.edu (Alan J Rosenthal) writes:
[lots deleted]
>Why not just have your main in Fortran?  It could be just a call to cmain().
>I think this solves this problem.  Of course, it doesn't solve this problem
>when you are trying to compile with two non-C languages, but for just one it's
>fine.

I've often used C as a fron end to Fortran to allow the use of command-line
arguments to the program call, and pass most or all of these options
(possibly parsed & manipulated by C) to my fortran routine. 

Is there a common way of getting command-line arguments / flags to fortran
in a more direct manner?

	--M.



More information about the Comp.lang.c mailing list