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

  1. Path: sparky!uunet!decwrl!waikato.ac.nz!aukuni.ac.nz!ecmtwhk
  2. Newsgroups: comp.lang.fortran
  3. Subject: Re: programming style question
  4. Message-ID: <1992Aug13.004056.3819@ccu1.aukuni.ac.nz>
  5. From: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig)
  6. Date: Thu, 13 Aug 1992 00:40:56 GMT
  7. References: <1992Aug12.193739.23817@news.Hawaii.Edu>
  8. Organization: University of Auckland, New Zealand.
  9. Lines: 30
  10.  
  11. tholen@galileo.ifa.hawaii.edu (Dave Tholen) writes:
  12.  
  13. >A question about programming style:  How many of you explicitly OPEN
  14. >preconnected units, which nowadays usually mean standard input, standard
  15. >output, and sometimes standard error (typically units 5, 6, and 0)?  In
  16. >the old days, 5 and 6 were often card reader and printer.
  17.  
  18. I have done work on both an MVS system and Unix boxes. In MVS, I only
  19. very rarely open a unit explicitly (for example when I loop over all the
  20. members in a PDS). Usually, I preconnect all the units in the JCL.
  21.  
  22. It's a real shame that Unix does not have standard way of attatching
  23. FORTRAN units to file descriptors, that would make things much easier.
  24. Does POSIX have anything to say about that?
  25.  
  26. If I port a program from one machine to the other, I usually manually
  27. insert the necessary OPEN statements, plus the commands to get the
  28. filenames from the command line or to read them from stdin. I have to
  29. do editing anyway, because the syntax of our beloved, non- standard
  30. INCLUDE is different for both machines; it's INCLUDE (MEMBER) for
  31. MVS, and INCLUDE 'header.fi' for Unix.
  32.  
  33. I don't open anything which I know is preconnected. The needed filenames
  34. are too different, anyway; opening '/dev/tty' under Unix (what about
  35. background jobs, though?) or 'CON' under MS-DOS or... If I have to change
  36. those, I might as well add a few more OPEN's.
  37. -- 
  38. Thomas Koenig, ecmtwhk@ccu1.aukuni.ac.nz, ib09@rz.uni-karlsruhe.de
  39. The joy of engineering is to find a straight line on a double logarithmic
  40. diagram.
  41.