Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!texsun!texsun.central-relay.sun.com!convex!authorplaceholder From: hutchson@convex.UUCP Newsgroups: comp.lang.fortran Subject: Re: I would like to have an argumen Message-ID: <68000011@convex> Date: 9 Mar 88 21:57:00 GMT References: <720@cresswell.quintus.UUCP> Lines: 33 Nf-ID: #R:cresswell.quintus.UUCP:-72000:convex:68000011:000:1926 Nf-From: convex.UUCP!hutchson Mar 9 15:57:00 1988 GCOS has a similar bifurcation between (global) file names and (local) file descriptors. The "file descriptors" are set up by the environment--the usual jcl or shell commands. We (I was supporting GCOS Fortran-77 at the time) had endless complaints from users about what was possible/difficult/confusing about file access via the OPEN statement, until we adopted a scheme essentially identical to the one suggested: 1) open status='scratch' generated (or accessed) a temporary file in the local name space: it usually vanished at job close but could be left around via close status='keep' (This last, of course, is an extention to the ANSI standard. 2) open name='ambiguous name' looked first in the local name space then in the global name space for the file; if not found, it created it in the global name space. 3) open name='global name' (The local name space was a subset of the global name space) looked in the global name space; if not found, it created it. This made everyone happy: it is general enough that plain-vanilla use of open works as on other systems, powerful enough to do anything you could think of doing with an OPEN statement, easy to explain. I work on unix now, and I miss temporary files. Yes, I know about mktemp: it doesn't work at all well, and I wrote a better one for my own uses. But there is no such thing on unix as a temporary file that steals SWIFTLY and silently away as soon as the job finishes executing. This is not a feature; this is a severe limitation! It is not possible to simulate temporary files on unix without great effort; it is a pain even to pretend to simulate it. "And there was evening and morning, another day. And abortive processes generated four more files in /tmp, and the system manager saw that it was not good, for verily the partition overflowed and the system rested on the seventh day."