Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!sdd.hp.com!wuarchive!udel!haven.umd.edu!uvaarpa!polaris.cv.nrao.edu!polaris.cv.nrao.edu!bglenden From: bglenden@colobus.cv.nrao.edu (Brian Glendenning) Newsgroups: comp.sys.hp Subject: Re: argv, argc into Fortran or C subroutine? Message-ID: Date: 7 May 91 18:30:08 GMT References: <1340019@hpuerca.HP.COM> Sender: news@polaris.cv.nrao.edu (News Manager) Organization: National Radio Astronomy Observatory Lines: 22 In-Reply-To: kgo@hpuerca.HP.COM's message of 6 May 91 22: 13:38 GMT In article <1340019@hpuerca.HP.COM> kgo@hpuerca.HP.COM (Kelly Oden) writes: bglenden@colobus.cv.nrao.edu (Brian Glendenning) writes: >I need to get command line arguments into a Fortran program that has >some C linked in, but no C main(). > >Since the 720 short-term loaner has almost no documentation associated >with it, I don't know how to do either. Could some one let me know? Try the following fortran intrinsics calls: Function iargc() is integer type and returns the number of parameters on the command line. igetarg(n, str, slen) ---called as function or subroutine This indeed worked, once I realized that iargc() needed to be called before igetarg (some setup, presumably). Brian -- Brian Glendenning - National Radio Astronomy Observatory bglenden@nrao.edu bglenden@nrao.bitnet (804) 296-0286