Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: pmunger DOT hmr AT ssss DOT gouv DOT qc DOT ca Subject: REWIND on stdin in g77 3.3.1 To: cygwin AT cygwin DOT com Date: Thu, 13 Nov 2003 15:15:18 -0500 Message-ID: MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii 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/