home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!decwrl!waikato.ac.nz!aukuni.ac.nz!ecmtwhk
- Newsgroups: comp.lang.fortran
- Subject: Re: programming style question
- Message-ID: <1992Aug13.004056.3819@ccu1.aukuni.ac.nz>
- From: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig)
- Date: Thu, 13 Aug 1992 00:40:56 GMT
- References: <1992Aug12.193739.23817@news.Hawaii.Edu>
- Organization: University of Auckland, New Zealand.
- Lines: 30
-
- tholen@galileo.ifa.hawaii.edu (Dave Tholen) writes:
-
- >A question about programming style: How many of you explicitly OPEN
- >preconnected units, which nowadays usually mean standard input, standard
- >output, and sometimes standard error (typically units 5, 6, and 0)? In
- >the old days, 5 and 6 were often card reader and printer.
-
- I have done work on both an MVS system and Unix boxes. In MVS, I only
- very rarely open a unit explicitly (for example when I loop over all the
- members in a PDS). Usually, I preconnect all the units in the JCL.
-
- It's a real shame that Unix does not have standard way of attatching
- FORTRAN units to file descriptors, that would make things much easier.
- Does POSIX have anything to say about that?
-
- If I port a program from one machine to the other, I usually manually
- insert the necessary OPEN statements, plus the commands to get the
- filenames from the command line or to read them from stdin. I have to
- do editing anyway, because the syntax of our beloved, non- standard
- INCLUDE is different for both machines; it's INCLUDE (MEMBER) for
- MVS, and INCLUDE 'header.fi' for Unix.
-
- I don't open anything which I know is preconnected. The needed filenames
- are too different, anyway; opening '/dev/tty' under Unix (what about
- background jobs, though?) or 'CON' under MS-DOS or... If I have to change
- those, I might as well add a few more OPEN's.
- --
- 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.
-