* REWIND on stdin in g77 3.3.1
@ 2003-11-13 20:19 pmunger.hmr
0 siblings, 0 replies; only message in thread
From: pmunger.hmr @ 2003-11-13 20:19 UTC (permalink / raw)
To: cygwin
After upgrading to g77 3.3.1 from g77 3.2, some of the code I was running
sucessfully before was not running anymore on a windows 2000 workstation.
After investigation, I found that the problem seemed to be when performing
REWINDs on stdin (unit 5).
To illustrate this, I created a simple fortran program test.f:
CHARACTER*1 LINE(80)
10 FORMAT(80A1)
READ(5,10)LINE
WRITE(6,10)LINE
READ(5,10)LINE
WRITE(6,10)LINE
REWIND(5)
READ(5,10)LINE
WRITE(6,10)LINE
READ(5,10)LINE
WRITE(6,10)LINE
END
I also created an input file, test.inp:
line 1
line 2
line 3
line 4
When compiling with g77 3.3.1, and running with "test.exe < test.inp" from
a cmd window the output is:
line 1
line 2
line 3
line 4
With g77 3.2, the output is what one should expect:
line 1
line 2
line 1
line 2
It seems that the REWIND statement has no effect in the 3.3.1 version. I
tried the same with the two versions of g77 on linux and both give the
correct result.
I would appreciate if someone could give me some insight on what is going
on here ...
Regards,
Patrice
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-11-13 20:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-13 20:19 REWIND on stdin in g77 3.3.1 pmunger.hmr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).