[Fwd: fortran read problem]

Xinan Zhou zhoux@lifepredictiontech.com
Thu Jun 13 14:48:00 GMT 2002


RE: [Fwd: fortran read problem]Hi, Mark, thank you very much for your message.

I tried your code with 3 data files that contain the same two line data but edited with cat, vi, and Notepad respectively. And found that only the data file edited by vi gives the correct results for two lines. The other two only give the correct results for the last line. I did not hit the 'return key' at the end of last line for all 3 data files.

It seems fortran read on cygwin interpret the end of line differently for data files edited by cat and Notepad.

Mark's code and test files are attached.

Again, thanks for Mark's help.

Xinan
  ----- Original Message ----- 
  From: Stucky, Mark B. UTRC 
  To: 'Xinan Zhou' ; cygwin@cygwin.com 
  Sent: Thursday, June 13, 2002 1:23 PM
  Subject: RE: [Fwd: fortran read problem]





  > -----Original Message----- 
  > From: Xinan Zhou [mailto:zhoux@lifepredictiontech.com] 
  > Sent: Thursday, June 13, 2002 12:38 PM 
  > To: cygwin@cygwin.com 
  > Subject: Re: [Fwd: fortran read problem] 
  > 
  > 
  > Hi, 
  > 
  > Can I safely say that it is a bug that fortran read(1, 
  > '(a132)') on cygwin 
  > cannot read an entire line properly from a data file edited 
  > by Notepad or 
  > vi? 
  > Or it is my mistake that I miss setting up something? 
  > 
  > Thank you and have a nice day! 
  > 



  No, it isn't a problem with cygwin and g77... 

  It is a problem with your source code.  I sent you 
  more info in a separate email... 

  --Mark 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cygwin.com/pipermail/cygwin/attachments/20020613/18cad558/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_read.f
Type: application/octet-stream
Size: 2687 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20020613/18cad558/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.vi
Type: application/octet-stream
Size: 58 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20020613/18cad558/attachment-0001.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20020613/18cad558/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testcat.dat
Type: application/octet-stream
Size: 58 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20020613/18cad558/attachment-0002.obj>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list