Hi
I am using the INDEX intrisic function on a file inside a DO WHILE loop to dictate the operations performed on the file. This bit of code forks fine:
DO WHILE (INDEX(STRING,'Connectivity').EQ.3
& .OR.INDEX(STRING,'domain').EQ.6)
On lines in my file like this:
# Connectivity for domain.16
967 domain.16 -j k-i f 33 1 1 1 122 1
But some the lines in the file are like this;
# Connectivity for domain.17
1043 domain.17 j k-i f 1 1 1 12 122 1
So I have changed my code as follows:
DO WHILE (INDEX(STRING,'Connectivity').EQ.3
& .OR.INDEX(STRING,'domain').EQ.6
& .OR.INDEX(STRING,'domain').EQ.7)
But this fails with the following error:
Input/Output Error 153: Input file ended
In Procedure: topobcwrite
At Line: 249
Statement: List-Directed READ
Unit: Internal File
Record Number: Floating point exception
Why does the modified code not work?
The file definately continues after the line it fails at.
I'm using Intel Fortran 7.1
Many thanks
Lewis
*****************************************
l.j.balfour at lboro.ac.uk
Research Student
Rolls-Royce UTC in Combustor Aerodynamics
Loughborough University
*****************************************
|