Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!haven!adm!smoke!ibd!heilpern From: heilpern@ibd.BRL.MIL (Mark A. Heilpern ) Newsgroups: comp.lang.c Subject: Re: Calling FORTRAN from C (Was: Ne Message-ID: <266@ibd.BRL.MIL> Date: 2 Jun 89 17:40:22 GMT References: <176@csun1.UUCP> <7800008@gistdev> <8905181540.AA06912@cartier.dgp.toronto.edu> Reply-To: heilpern@brl.arpa (Mark A. Heilpern (IBD) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 15 In article <8905181540.AA06912@cartier.dgp.toronto.edu> flaps@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.