noob question re: space delimited input
- From: nichevo@xxxxxxxxx
- Date: 25 Nov 2006 10:08:03 -0800
I am probably overlooking something very simple. I just don't see what
it is.
I have a test input file that called 'input.txt' containing:
1111 2222 3333
1111. 2222. 3333.
and a program:
....
open (unit=1, file='input.txt')
....
do while (length .NE. maxSize)
read (1, *, IOSTAT=ios) a, b, c
if (ios .EQ. -1) exit
length = length + 1
print*, a, b, c
end do
It reads the appropriate amount of entries before iostat returns '-1'
but my output looks like:
16777216 0 0
37810344 0 0
If I change the the type of a, b, and c to real, I get one wacky real
number and two 0's per line.
It is obviously not reading space delimited. I have been fiddling with
it for way too long now. I would appreciate some advice.
Thanks
.
- Follow-Ups:
- RE: noob question re: space delimited input
- From: meek
- Re: noob question re: space delimited input
- From: George N. White III
- Re: noob question re: space delimited input
- From: Richard Maine
- Re: noob question re: space delimited input
- From: dpb
- RE: noob question re: space delimited input
- Prev by Date: Re: Fortran WRITE changes ctime
- Next by Date: Absoft f77 compiler error
- Previous by thread: Dynamic Array Definition problem in f90
- Next by thread: Re: noob question re: space delimited input
- Index(es):