Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!asuvax!noao!amethyst!raw From: raw@math.arizona.edu (Rich Walters) Newsgroups: comp.lang.fortran Subject: Re: command line argument in Fortran? Keywords: command line,options,getopt Message-ID: <1510@amethyst.math.arizona.edu> Date: 11 Mar 90 08:26:29 GMT References: <900310015025.24a08b20@Romeo.Caltech.Edu> Sender: news@amethyst.math.arizona.edu Organization: Dept. of Math., Univ. of Arizona, Tucson AZ 85721 Lines: 24 In article <900310015025.24a08b20@Romeo.Caltech.Edu> xiaohe@CitRomeo.BITNET (Xiao-He Zhang) writes: > >Greetings! > > I have a question: can Fortran programs be compiled to take command line >arguments like C, with or without some tricks? In other words, can I have > a.out -argument(s) ? > >Thank you very much in advance! The FORTRAN on SUN's (UNIX) has a (non-standard) function called getopt that returns the command line arguments kinda like C. There is also a very nice C function called optarg (?). Try reading the man page intro(3F). It should list any non-standard functions/porcedures like this. Richard Walter ------------------------------------------------------------------------------- Keep on crunching those numbers -------------------------------------------------------------------------------