Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

input file with no delimiter

Status
Not open for further replies.

titun

Technical User
Jan 15, 2005
3
BE
Supppose I have an input file with the following shape:

MS_Persoon 1 2 2 60614 1-1951
MS_Persoon 2 3 1 14892 9-1983
MS_Persoon 3 3 1 53673 3-1985
MS_Persoon 4 1 1 9429812-1962
MS_Persoon 5 1 1 1026712-1924
...
The first variable is character (10), then integer(7), then 3 real (width 10, 2 significant digits) and finally a character (len=7) which represents the date of birth.
The variables are not separated by a delimiter.

When I read the following file, it stops at the 4th line.
I think this is due to the fact that the two last variables are not separated.

Is there any way of reading non delimited data?
 
1) What does the format of your read statement look like? There are 5 items on each line: you have only mentioned 4 of which one is a real. It looks like your data is something like

10A1, I5, I5, I5, A7, A5

2) Is the file opened as formatted or unformatted?

3) Which version of Fortran (IV, 77, 90, 95)
 
The data is:
(A10,I7,3I10,A7)
I am using fortran 95, and I have opened the data as unformatted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top