Hallo
I ran into the same problem several times.
It's just the way a while loop works. It's annoying but...
If I read into an array with autoindexing I keep a count of how many reads I did and delete the last entry. Or you'll have to insert a if-case inside the loop and process only if there was no EOF.
Using the high level routines in loop is certainly no way. Open-read-close-open-read-close-open-read..... is a certain performance killer.
Gabi
7.1 -- 2013
CLA