Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!pacbell.com!decwrl!hayes.fai.alaska.edu!accuvax.nwu.edu!earth.ce.nwu.edu!ravi From: ravi@earth.ce.nwu.edu (Ravi Sinha) Newsgroups: comp.lang.fortran Subject: File handling in Fortran 77 Message-ID: <11191@accuvax.nwu.edu> Date: 22 Aug 90 21:28:47 GMT Sender: news@accuvax.nwu.edu Reply-To: ravi@earth.ce.nwu.edu (Ravi Sinha) Organization: Civil Engineering Dept., Northwestern University Lines: 34 Hi, I have been wondering for a while about how certain aspects of file handling are supposed to be in Fortran 77 standard. Maybe someone can shed some light on it. (i) If you open an OLD file using status=UNKNOWN and write less no. of lines to it than is already there, should the new file have only the stuff written when it was opened last. Or should the write statement just overwrite the old file, thereby leaving rest of the old contents untouched. I have seen implementations of compilers which do either and I am not sure which is the expected behavior. (ii) Can you open a file with status=NEW if the file already exists. Again I have seen implementations which don't allow this (most unix), and others which allow you to open existing files with status=NEW (vax/vms). (iii) (i) if an old file is opened with status=NEW qualifier. (iv) Are any of these issues dependent on whether your file is binary or ASCII. I remember that there were some discussions a few months ago about how to change only portions of an existing file through selective read/write. I can't recall the details, though. Thanks. --------------------------------------------------------------------- Ravi Sinha | As usual, the opinions here Northwestern University | are mine, and only mine. ravi@earth.ce.nwu.edu | Who'd want to claim these anyway?