Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!wuarchive!uunet!sdrc!wggabb From: wggabb@sdrc.COM (Rob Gabbard) Newsgroups: comp.lang.fortran Subject: Re: Command line arguements? Message-ID: <954@sdrc.COM> Date: 30 May 91 14:49:22 GMT References: Organization: SDRC, Cincinnati Lines: 31 From article , by eesnyder@boulder.Colorado.EDU (Eric E. Snyder): > I need to write a program that takes arguements from the > command line and passes them to variables with in the program. > > a.out arg1 arg2 .... > > This must be amazingly simple but I can't find anything in > my SGI Iris 4D f77 manual. What do you call this and where > can I find out about it? Try getarg and iargc (section 3F in the IRIS-4D FORTRAN 77 Reference Manual) character*N c integer i,j call getarg(i,c) j = iargc() getarg returns the i-th command line argument iargc returns the index of the last argument Most F77 compilers have some kind of getarg/iargc function. Some, at least HP, have implemented it as an intrinsic. -- The statements above are my own and do not neccesarily reflect the opinion of my employer. ------------------------------------------------------------------------------- Rob Gabbard wggabb@sdrc.sdrc.com Technical Development Engineer Structural Dynamics Research Corporation