home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / fortran / 3097 < prev    next >
Encoding:
Internet Message Format  |  1992-08-20  |  1.4 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!convex!news.oc.com!spssig.spss.com!uchinews!msuinfo!rudolf.nscl.msu.edu!fox
  2. From: fox@rudolf.nscl.msu.edu (Ron Fox)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: Unix ARGC,ARGV in Fortran 77
  5. Message-ID: <1992Aug20.120608.3562@msuinfo.cl.msu.edu>
  6. Date: 20 Aug 92 12:06:08 GMT
  7. References: <14542@borg.cs.unc.edu> <1848@mefos.se>
  8. Sender: news@msuinfo.cl.msu.edu
  9. Reply-To: fox@rudolf.nscl.msu.edu (Ron Fox)
  10. Organization: National Superconducting Cyclotron Lab.
  11. Lines: 26
  12.  
  13. --
  14.  
  15. >marshall@marshall.cs.unc.edu (Jonathan A. Marshall) writes:
  16. >: I need to write a Fortran program that will accept command-line
  17. >arguments.
  18. >: I'm running Ultrix f77 on a DECstation 5000.  In C, command-line
  19. >arguments
  20. >: can be passed with argc and argv.
  21. >: 
  22.  
  23.   According to pf 3-3 of the 
  24. _DEC_FORTRAN_FOR_ULTRIX_RISC_SYSTEMS_USER_MANUAL_ 
  25. for version 3.0, the routines getarg() returns command line arguments.
  26. my version of the manual pages does have a man 3f getarg. So you
  27. can get the details there.  Although in summary:
  28.  
  29.  
  30.    nargs = iargc()     ! Returns the number of arguments.
  31.    call getarg(k, arg) ! Returns the k'th argument into arg.
  32.  
  33.  
  34. Ron Fox                     | FOX@MSUNSCL.BITNET      | Where the name 
  35. NSCL                        | FOX@RUDOLF.NSCL.MSU.EDU | goes on before
  36. Michigan State University   | MSUHEP::RUDOLF::FOX     | the quality
  37. East Lansing, MI 48824-1321 |                         | goes in.
  38. USA
  39.