Appending data to pre-exisiting files
Steve Edwards
edwardss@whl.co.uk
Wed Jul 27 16:45:00 GMT 2005
On Wed, 2005-07-27 at 16:08, Richard E Maine wrote:
> On Jul 27, 2005, at 4:27 AM, Steve Edwards wrote:
> Position='append' is a standard feature in f90 and thus will work with
> all f90 compilers. But there is no simple standard way to do it in f77.
> Some f77 compilers support the f90 form. The access='append' that you
> noticed is a nonstandard form specific to a few compilers.
It was the access='append' extension that I unfortunately didn't know
about. Perhaps I should have asked comp.lang.fortran instead of here.
Thanks for the explanation.
> The only standard and portable way to do this in fortran 77 is to open
> the file and read through it to the end (backspacing after you hit the
> end of file). Yes, this is a pain - particularly if the file is large.
> It is enough of a pain that it is sometimes worth doing nonstandard
> things even though they cause porting problems.
That has been my implementation using g77. I put up with the ugly code
purely because it *does* have to be portable.
> As long as you have to stick to f77, it will continue o be a pain one
> way or another.
Looking forward to switching to gfortran now!
S Edwards
--
----------------------------------------------------------
----------------------------------------------------------
More information about the Fortran
mailing list