On Thursday, March 17, 2022 at 12:03:22 AM UTC-7, Ron Shepard wrote:
(snip)
> I think this might depend on more than just the compiler, it might also
> depend on the file system characteristics. An OS can support many file
> systems these days, including network file systems hosted by a different
> remote OS.
> For another example, the VAX/VMS system had a file naming convention
> that included version numbers, xxx.yyy.n.
It still does. Well, VAX/VMS is pretty much unsupported now, but
Alpha/VMS and IA64/VMS still exist and are still supported.
DECnet has support for remote files based on DEC file systems.
I am not sure about using NFS to/from VMS based systems.
> If you opened a file with
> 'UNKNOWN', then you opened the file with the highest version number if
> it existed, or you opened the xxx.yyy.1 file if it didn't. If you opened
> the file with 'NEW', then you would get a new file with an incremented
> version number, and the old files were still there. This was before
> 'REPLACE' was one of the options. I think before the VAX, the DECSYSTEM
> had a similar convention, but those OPEN() statements had a slightly
> different set of keywords because that was before f77 standardized that
> behavior.
It is supposed to work such that if you open without a ;(the version qualifier)
for reading you get the most recent, and for writing you get a new version.
Exactly how that works with Fortran, I am not so sure.
I always tried to have my Fortran programs that read files open them
in a read only mode, to avoid confusion by the OS, and accidentally
deleting one.
Before Fortran 77, the rules were somewhat complicated by the
system figuring out what you meant, with the first I/O statement
being READ or WRITE.