I still don't see the point of even using eof. I think it would be easier to use -1 or some letter combination to exit a loop.