Article View: comp.lang.fortran
Article #6582Re: Passing parameter when loading a Fortran program
From: rzarhj97
Date: Wed, 03 Dec 1997 00:00
Date: Wed, 03 Dec 1997 00:00
44 lines
1725 bytes
1725 bytes
John W. Lewellen wrote: > > DMASYB wrote: > > > > Can anyone help me with this: How to pass a parameter to a program when > > loading it. > > For example: Program name is ANYPROG.EXE > > The parameter is PARAM1 > > I want to execute the program like this: > > > > ANYPROG.EXE PARAM1 > > > > Any help would be greatly appreciated. > > Thanks. > You could load your parameter into the program by reading it from a file. like: program main .... character param1 real parnum write(*,*) 'parameter?' param1.txt read(*,*) param1 read(5,FILE='param1') parnum etc good luck -- | | / | |___| ___ ___ _|__ ___ ___ <'o / o | | |___| | | | | | ()-^ ---c-()> | | |___ |___ |__ |___| | / > < \
Technical Details
Message-ID:
<3485F501.5394@hotmail.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<eO0dwSAA9GA.264@upnetnews04> <34859736.7E47565E@aps.anl.gov>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcffb,5596e8b35b5f590 X-Google-Attributes: gidfcffb,public X-Google-Thread: f9607,5596e8b35b5f590 X-Google-Attributes: gidf9607,public X-Google-Thread: 167b2b,5596e8b35b5f590 X-Google-Attributes: gid167b2b,public X-Google-Thread: 1094ba,5596e8b35b5f590 X-Google-Attributes: gid1094ba,public X-Google-Thread: f754b,5596e8b35b5f590 X-Google-Attributes: gidf754b,public From: rzarhj97@hotmail.com Subject: Re: Passing parameter when loading a Fortran program Date: 1997/12/03 Message-ID: <3485F501.5394@hotmail.com> X-Deja-AN: 295017682 References: <eO0dwSAA9GA.264@upnetnews04> <34859736.7E47565E@aps.anl.gov> Organization: ITESM Campus Monterrey . DINF-DTCI Newsgroups: comp.lang.fortran,fj.lang.fortran,microsoft.public.fortran,slac.lang.fortran,tw.bbs.comp.lang.fortran