Problem with g77 Fortran
Toon Moene
toon@moene.indiv.nluug.nl
Wed Jul 10 14:55:00 GMT 2002
I wrote:
> Rob Willson wrote:
> > open(unit=1,file='datafile.dat', recl=132,status='old')
> > Read(1,10) x,y,z
> > 10 FOrmat(3f10.2)
> >
> > When I say: f77 -o prog prog.f , I get a statement.." sfe: formatted io
> > is not allowed"
>
> The "recl=132" makes the run time library think this is a direct access
> file. Removing it will make the program work.
This analysis is not correct - it makes the run time library think this
is an unformatted file.
> I'll look up whether this is correct behaviour.
I asked around on comp.lang.fortran; this is the result:
Fortran 77 left this open - Fortran 90 interpreted it as: The record
length is the maximum you can use (write to) on sequential I/O.
I made a fix to the g77 run time library to allow RECL=nnn without
having it assuming you want unformatted I/O.
This change will be in the next major release.
Cheers,
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
More information about the Gcc-help
mailing list