home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!waikato.ac.nz!aukuni.ac.nz!ecmtwhk
- Newsgroups: comp.lang.fortran
- Subject: Re: programming style question
- Message-ID: <1992Aug23.013704.18713@ccu1.aukuni.ac.nz>
- From: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig)
- Date: Sun, 23 Aug 1992 01:37:04 GMT
- References: <1992Aug13.081049.4648@newssrv.edvz.univie.ac.at>
- <1992Aug14.002538.3929@monu6.cc.monash.edu.au> <1992Aug21.184751.9673@draco.macsch.com> <1992Aug22.205756.21870@chpc.utexas.edu>
- Organization: University of Auckland, New Zealand.
- Lines: 42
-
- aswx266@chpc.utexas.edu (Michael Lemke) writes:
-
- >In article <1992Aug21.184751.9673@draco.macsch.com> drd@macsch.com (Daniel R. Dawson) writes:
- >>Forget about using links, man!
- >>
- >>Here's how I'd handle this problem for Unix boxes:
- >>
- >>(C-Shell script fragment similar to the DCL script fragment above)
- >>setenv FOR005 ${1}.dat
- >>setenv FOR006 ${1}.out
- >>myprog
- >>unsetenv FOR005
- >>unsetenv FOR006
- >>
- >>Then, in the Fortran, just use getenv() to get the filenames
- >>for the open statements.
- >>
- >>Easy as pie!
-
- Quite an elegant solution, I guess I'll start using it.
-
- >Except it is no standard Fortran anymore. And it won't run on VMS
- >anymore either. Of course you can conconct a getenv function but that
- >would have to be changed for the IBM again (can it be done?).
-
- You don't need to. In MVS and CMS, you can pre-open units with a DD-card
- or equivalent.
-
- OPEN - statements are highly system - dependent anyway.
-
- >But the actual solution for this particular problem is terribly easy in
- >Unix:
-
- >myprog <${1}.dat >${2}.out
-
- If your program happens to read only from one file and write to one
- file, that's ok. Unfortunately, my problems usually don't fall into that
- category.
- --
- Thomas Koenig, ecmtwhk@ccu1.aukuni.ac.nz, ib09@rz.uni-karlsruhe.de
- The joy of engineering is to find a straight line on a double logarithmic
- diagram.
-