This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: unformatted input from files in g77?
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: tprince at computer dot org
- Cc: Jack Howarth <howarth at bromo dot med dot uc dot edu>, gcc at gcc dot gnu dot org
- Date: Fri, 15 Mar 2002 23:34:23 +0100
- Subject: Re: unformatted input from files in g77?
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <200203151908.OAA98018@bromo.msbb.uc.edu> <20020315204634.9B4132CD66@inet1.ywave.com>
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)