Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!hp-pcd!hpfcso!hpfcmgw!hpfcse!hpuerca!kgo From: kgo@hpuerca.HP.COM (Kelly Oden) Newsgroups: comp.sys.hp Subject: Re: argv, argc into Fortran or C subroutine? Message-ID: <1340019@hpuerca.HP.COM> Date: 6 May 91 22:13:38 GMT References: Organization: Hewlett-Packard NARC -- Atlanta Lines: 23 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 where: n - integer specifying which command line arg to get str - character variable that will contain the arg requested slen - integer specifying max length of str(for padding). igetarg() returns the number of significant characters in str, otherwise -1. (when n=0, igetarg returns the program name) This is a little sketchy but I hope it helps.