Re: Read DOS or Unix files with the same fortran code
- From: "tianyf@xxxxxxxxx" <tianyf@xxxxxxxxx>
- Date: Wed, 28 Nov 2007 00:45:45 -0800 (PST)
On Nov 27, 8:54 am, feenb...@xxxxxxxxx wrote:
I would like my fortran program to be able to read text files with
either Unix or DOS line endings..
The read is free format. (read(*,*) (x(i),i=1,22).
The compiler is gcc version 3.4.6 [FreeBSD] 20060305
The OS is FreeBSD 6.2
Code is standard F77
Is there an option I could set or another compiler that I could use
that would allow the stray contol-Ms in DOS formatted files without
getting upset? I understand that I could preprocess DOS files with
dos2unix, but that adds complications I would prefer to avoid.
Thank you
Daniel Feenberg
National Bureau of Economic Research
feenberg at nber dotte org
I used Fortran to read/write ASCII files in FreeBSD, Solaris, and
Windows. There seems no problems. I suppose that the line-ending
difference between DOS and Unix sytles does not matter.
Cheers,
Tian
.
- Follow-Ups:
- Re: Read DOS or Unix files with the same fortran code
- From: Charles Russell
- Re: Read DOS or Unix files with the same fortran code
- From: Richard Maine
- Re: Read DOS or Unix files with the same fortran code
- From: glen herrmannsfeldt
- Re: Read DOS or Unix files with the same fortran code
- References:
- Read DOS or Unix files with the same fortran code
- From: feenberg
- Read DOS or Unix files with the same fortran code
- Prev by Date: Re: dynamic filename string
- Next by Date: Re: Fortran Error Reporting Requirements (Was: GFORTRAN PROBLEM WITH SAVE STATEMENT)
- Previous by thread: Re: Read DOS or Unix files with the same fortran code
- Next by thread: Re: Read DOS or Unix files with the same fortran code
- Index(es):
Relevant Pages
|
|