home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / fortran / 5205 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.0 KB  |  46 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!mcsun!Germany.EU.net!gmd.de!newsserver.jvnc.net!yale.edu!spool.mu.edu!howland.reston.ans.net!usc!zaphod.mps.ohio-state.edu!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!cv3.cv.nrao.edu!pmurphy
  3. From: pmurphy@nrao.edu (Pat Murphy)
  4. Subject: Re: How to get command line arguments from unix with FORTRAN?
  5. In-Reply-To: pln@egret0.Stanford.EDU's message of 25 Jan 93 22: 24:21 GMT
  6. Message-ID: <PMURPHY.93Jan26121847@orangutan.cv.nrao.edu>
  7. Sender: news@nrao.edu
  8. Organization: National Radio Astronomy Observatory
  9. References: <1993Jan25.214008.10580@leland.Stanford.EDU> <1k1palINNao2@morrow.stanford.edu>
  10. Date: Tue, 26 Jan 1993 17:18:47 GMT
  11. Lines: 33
  12.  
  13. "PLN" == Patrick L. Nolan <pln@egret0.Stanford.EDU> writes:
  14.  
  15. PLN> Peter Kocks (kocks@leland.Stanford.EDU) wrote:
  16.  
  17. PLN> : Can someone tell me how to read the command line arguments of
  18. PLN> : a unix command line from with FORTRAN.  Something presumably similar
  19. PLN> : to the c
  20. PLN> : 
  21. PLN> : main(int argc, char **argv){
  22. PLN> : }
  23. PLN> : 
  24. PLN> It probably varies with the flavor of unix.  On a Sun, you have:
  25.  
  26. PLN>      subroutine getarg ( k, arg )
  27. PLN>      character*(*) arg
  28. PLN>  
  29. PLN>      function iargc ()
  30.  
  31. A brief experiment with telnet shows that his posting machine is not a
  32. Sun: "ULTRIX V4.2A (Rev. 47)".  My f77 info for Ultrix (4.0),
  33. fortunately shows getarg identical to the above.  However I know that
  34. for other flavors of unix it is different.  For example, HP-UX uses a
  35. function IGETARG with three arguments.
  36.  
  37.                 - Pat
  38. --
  39. ==========================================================================
  40. | Patrick P. Murphy, Ph.D.                Scientific Programming Analyst |
  41. | National Radio Astronomy Observatory    Net:       pmurphy@nrao.edu    |
  42. | 520 Edgemont Road                       Phone:     (804) 296-0372      |
  43. | Charlottesville, VA 22903-2475          VoiceMail: (804) 980-5889      |
  44. |      "I don't believe in the no-win scenario"  --- James T. Kirk       |
  45. ==========================================================================
  46.