reading from a file

John Ridge ridge11103 at btinternet.com
Sun Jun 12 06:46:23 EDT 2005


I need to read from a text file until I hit EOF - but in the meantime I want
to process each of the chunks I'm reading (separated by delimiters).

It seemed obvious and natural to start off, after opening the file,
   
       repeat until EOF
       read from file xxx until <delimiter>
 ...process next chunk...
       end repeat

But, alas, this runs forever - it doesn't encounter EOF, although I was
careful to "close" the file when I wrote it out. I can't find anything in
the docs that explains why it doesn't work. Should it?

Apologies if the answer is just too obvious!
John
-- 




More information about the use-livecode mailing list