Read DOS or Unix files with the same fortran code
- From: feenberg@xxxxxxxxx
- Date: Mon, 26 Nov 2007 16:54:02 -0800 (PST)
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
.
- Follow-Ups:
- Re: Read DOS or Unix files with the same fortran code
- From: tianyf@xxxxxxxxx
- Re: Read DOS or Unix files with the same fortran code
- From: Terence
- Re: Read DOS or Unix files with the same fortran code
- From: e p chandler
- Re: Read DOS or Unix files with the same fortran code
- From: Tim Prince
- Re: Read DOS or Unix files with the same fortran code
- From: Arjen Markus
- Re: Read DOS or Unix files with the same fortran code
- Prev by Date: Re: Execution times running multiple instances of an application
- Next by Date: Re: allocating arrays, trouble
- Previous by thread: Execution times running multiple instances of an application
- Next by thread: Re: Read DOS or Unix files with the same fortran code
- Index(es):
Relevant Pages
|