This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: unformatted input from files in g77?


Tim Prince wrote:

> I don't see what this has to do with unformatted input or output.   In all
> your examples you are specifying default formatting. I see that g77 is
> rejecting the UNIT= keyword; doesn't it work with the older form, where
> "UNIT=" is omitted?  I don't have my f77 standard here, to see whether the
> UNIT keyword was specified there; g77 has no support for keywords introduced
> in f90.

A little experimenting got me to the point where I could generate the
error message.

Take this source, which confuses unformatted and formatted I/O (in that
order):

toon@laptop:~/g77-bugs$ cat howarth.f
      dimension ur(3)
      open(unit=13)
      read(unit=13,*) ur(1), ur(2), ur(3)
      end
toon@laptop:~/g77-bugs$ g77 howarth.f
howarth.f: In program `MAIN__':
howarth.f:3: 
         read(unit=13,*) ur(1), ur(2), ur(3)
                      ^
Invalid form for READ statement at (^)

Note that the ^ points to the format string (*) as invalid.

-- 
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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]