Subject: Re: [Fwd: fortran read problem]
From: Tim Prince <[email-masked]>
To: "Xinan Zhou" <[email-masked]>
Cc: <[email-masked]>
Date: Thu, 13 Jun 2002 06:04:08 -0700

On Thursday 13 June 2002 05:40, Xinan Zhou wrote:
> Hi, Tim, thank you for your response.
>
> What I want to do is to port worked program on Linux to cygwin. In the
> ported program, the input file needs to be parsed and one entire line is
> read in each time. The input file has the following format:
>
> *HEADING
> Model: beam
> *NODE
> 1,0.,0.,0.
> 2,1.,0.,0.
> ......
> *ELEMENT, TYPE=C3D20R
> 1,1,2,3,4,13,14,15,16,5,6,
>   7,8,17,18,19,20,9,10,11,12
> ......
>
> being able to read in one entire line each time will make parsing terse.
>
> It did pass the compile and give the executable with g77 testRead.f. And
> the same test program gives correct results  on MS Fortran.
>
> Could you tell me how to fix the incompatible mixture of fixed and free
> format input or your
> modified one? Can your modified one read the entire line?

I simply reformatted the source file to fixed format (spacing statements over 
to column 7 as required).  It ran fine, same on cygwin and on linux.  As I 
said, I suspected you might have tried to use a DOS text file, but I didn't 
try to replicate such a problem.

-- 
Tim Prince

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