[net.lang.f77] command arguments in Fortran

bloomber@noscvax.UUCP (Michael N. Bloomberg) (05/25/84)

Is there some way of reading in command arguments to a f77
program?? I realize you can do it in C by using the argc and
argv pointers. My understanding is that the f77 compiler was
written in C so it seems possible that one could read in
command arguments.

Please mail responses to:  bloomber@NOSC

			      Thanks,
			      Mike
				
				 

woods@hao.UUCP (Greg Woods) (05/29/84)

   You really must tell us what version of f77 you are running when you ask
questions like this. We run 4.2 here, and in the 3F section of the manual
(FORTRAN subroutines) there is getarg(3f), iargc(3f), and getenv(3f), which
will return the  command line arguments. iargc(3f) is a function that returns
"argc", "call getarg(k,arg)" returns *argv[k-1] in the CHARACTER variable "arg",
and "call getenv(env,value)" returns the value of the environment variable
"env" in "value". 

	Greg "FORTRAN hacker" Woods
-- 
{ucbvax!hplabs | allegra!nbires | decvax!stcvax | harpo!seismo | ihnp4!stcvax}
       		        !hao!woods
   
   "Will we leave this place an empty stone?"