Do you really need to read ONE character at a time to parse a file? If the file is a text file, then you better have a look at my solution to a similar (but limited to the first word of a line) problem posted in thread222-109781.
The code can easily (?) be adapted to more complex parsing. _________________________________
In theory, there is no difference between theory and practice. In practice, there is. [attributed to Yogi Berra]