Article View: comp.lang.fortran
Article #4516Re: How to get command line arguments from unix with FORTRAN?
From: Pat Murphy
Date: Tue, 26 Jan 1993 17:18
Date: Tue, 26 Jan 1993 17:18
33 lines
2093 bytes
2093 bytes
"PLN" == Patrick L. Nolan <pln@egret0.Stanford.EDU> writes:
PLN> Peter Kocks (kocks@leland.Stanford.EDU) wrote:
PLN> : Can someone tell me how to read the command line arguments of
PLN> : a unix command line from with FORTRAN. Something presumably similar
PLN> : to the c
PLN> :
PLN> : main(int argc, char **argv){
PLN> : }
PLN> :
PLN> It probably varies with the flavor of unix. On a Sun, you have:
PLN> subroutine getarg ( k, arg )
PLN> character*(*) arg
PLN>
PLN> function iargc ()
A brief experiment with telnet shows that his posting machine is not a
Sun: "ULTRIX V4.2A (Rev. 47)". My f77 info for Ultrix (4.0),
fortunately shows getarg identical to the above. However I know that
for other flavors of unix it is different. For example, HP-UX uses a
function IGETARG with three arguments.
- Pat
--
==========================================================================
| Patrick P. Murphy, Ph.D. Scientific Programming Analyst |
| National Radio Astronomy Observatory Net: pmurphy@nrao.edu |
| 520 Edgemont Road Phone: (804) 296-0372 |
| Charlottesville, VA 22903-2475 VoiceMail: (804) 980-5889 |
| "I don't believe in the no-win scenario" --- James T. Kirk |
==========================================================================
Technical Details
Message-ID:
<PMURPHY.93Jan26121847@orangutan.cv.nrao.edu>Path:
arc1-ca.pugleaf.net!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!pmurphyReferences:
<1993Jan25.214008.10580@leland.Stanford.EDU> <1k1palINNao2@morrow.stanford.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.fortran Path: arc1-ca.pugleaf.net!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 From: pmurphy@nrao.edu (Pat Murphy) Subject: Re: How to get command line arguments from unix with FORTRAN? In-Reply-To: pln@egret0.Stanford.EDU's message of 25 Jan 93 22: 24:21 GMT Message-ID: <PMURPHY.93Jan26121847@orangutan.cv.nrao.edu> Sender: news@nrao.edu Organization: National Radio Astronomy Observatory References: <1993Jan25.214008.10580@leland.Stanford.EDU> <1k1palINNao2@morrow.stanford.edu> Date: Tue, 26 Jan 1993 17:18:47 GMT Lines: 33