home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / fortran / 3116 < prev    next >
Encoding:
Internet Message Format  |  1992-08-22  |  1.8 KB

  1. Path: sparky!uunet!wupost!waikato.ac.nz!aukuni.ac.nz!ecmtwhk
  2. Newsgroups: comp.lang.fortran
  3. Subject: Re: programming style question
  4. Message-ID: <1992Aug23.013704.18713@ccu1.aukuni.ac.nz>
  5. From: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig)
  6. Date: Sun, 23 Aug 1992 01:37:04 GMT
  7. References: <1992Aug13.081049.4648@newssrv.edvz.univie.ac.at>   
  8.  <1992Aug14.002538.3929@monu6.cc.monash.edu.au> <1992Aug21.184751.9673@draco.macsch.com> <1992Aug22.205756.21870@chpc.utexas.edu>
  9. Organization: University of Auckland, New Zealand.
  10. Lines: 42
  11.  
  12. aswx266@chpc.utexas.edu (Michael Lemke) writes:
  13.  
  14. >In article <1992Aug21.184751.9673@draco.macsch.com> drd@macsch.com (Daniel R. Dawson) writes:
  15. >>Forget about using links, man!
  16. >>
  17. >>Here's how I'd handle this problem for Unix boxes:
  18. >>
  19. >>(C-Shell script fragment similar to the DCL script fragment above)
  20. >>setenv FOR005 ${1}.dat
  21. >>setenv FOR006 ${1}.out
  22. >>myprog
  23. >>unsetenv FOR005
  24. >>unsetenv FOR006
  25. >>
  26. >>Then, in the Fortran, just use getenv() to get the filenames
  27. >>for the open statements.
  28. >>
  29. >>Easy as pie!
  30.  
  31. Quite an elegant solution, I guess I'll start using it.
  32.  
  33. >Except it is no standard Fortran anymore.  And it won't run on VMS 
  34. >anymore either.  Of course you can conconct a getenv function but that 
  35. >would have to be changed for the IBM again (can it be done?).
  36.  
  37. You don't need to. In MVS and CMS, you can pre-open units with a DD-card
  38. or equivalent.
  39.  
  40. OPEN - statements are highly system - dependent anyway.
  41.  
  42. >But the actual solution for this particular problem is terribly easy in 
  43. >Unix:
  44.  
  45. >myprog <${1}.dat >${2}.out
  46.  
  47. If your program happens to read only from one file and write to one
  48. file, that's ok. Unfortunately, my problems usually don't fall into that
  49. category.
  50. -- 
  51. Thomas Koenig, ecmtwhk@ccu1.aukuni.ac.nz, ib09@rz.uni-karlsruhe.de
  52. The joy of engineering is to find a straight line on a double logarithmic
  53. diagram.
  54.