Appending data to pre-exisiting files

Richard E Maine Richard.Maine@nasa.gov
Wed Jul 27 21:17:00 GMT 2005


On Jul 27, 2005, at 1:59 PM, Emil Block wrote:

> g77 supports  'access=append' , and gfortran should, in my view, 
> support this
> non standard form as do the many fortran compilers that I've used over 
> the years.

I have personally used many compilers that do not support that 
particular
nonstandard form. In fact, I doubt that most of the compilers I use 
today
support it. If you have code that depends on this, you'll have porting
problems with other compilers, even if you haven't seen them yet.

I have also long regarded this as a particularly ill-advised
form in that it confuses two different concepts (access method
and file position), thus inviting difficulties relating to future 
enhancements.

For example, it doesn't "fit" very well with f2003 stream access. It is 
quite
reasonable to want to append to stream files, but this form doesn't
accommodate that because the "access" keyword has been used for
something that isn't an access method, leaving no way to specify
the actual access method. The access='append' form just assumes
that sequential access is implied. The standard's form of
access='stream',position='append' works just fine.

-- 
Richard Maine                |  Good judgment comes from experience;
Richard.Maine@nasa.gov       |  experience comes from bad judgment.
                             |        -- Mark Twain



More information about the Fortran mailing list