dorrestn@nvpna1.UUCP (Frans Dorrestein ) (09/22/86)
Am I missing something, or is the ST-BASIC EOF function totally useless? I tried to read a file upto the end and I wanted to detect eof by means of the eof function. If I don't include the "on error" statement I get a "You reached end-of-file" error at line 170, but if I do include the "on error" statement, then I end up in an infinite loop. Here is my ST BASIC program: 100 on error goto 210 110 line%=0 120 open "I",#1,"file.ext" 130 line input #1,buf$ 140 while not eof(1) 150 line%=line%+1 160 print line%,buf$ 170 line input #1,buf$ 180 wend 190 close #1 200 end 210 print "Error";err;"at line";erl <--- just to see what is going on 220 resume next Frans Dorrestein.