Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!caen!sdd.hp.com!hp-pcd!hpfcso!hplabs!hpcc05!hpsciz!hpdtczb!rd From: rd@hpdtczb.HP.COM (Dick Dowell) Newsgroups: comp.sys.hp Subject: Re: argv, argc into Fortran or C subroutine? Message-ID: <2190011@hpdtczb.HP.COM> Date: 8 May 91 16:11:44 GMT References: Organization: HP Design Tech Center - Santa Clara, CA Lines: 12 The "iargc" and "igetarg" solutions posted are good ones. I have found that some machines (notably the series 800, but that was a few years ago) don't recognize igetarg. By using the "guess method" I came upon a call to "getarg" which is call getarg(num,arg) where "num" is the argument number, arg is character variable to get argument. This works on Sun, and Apollo. On the 800, I believe argument 1 is the program name, on the others it is the first argument. I use iargc on all the machines to get the number of arguments (again, test this stuff before using it). Dick "compatibility?" Dowell (rd@dtc.hp.com)