I don't know if it's a real bug, so i'd like to get some opinions from you before I submit it to the bugtracker at sourceforge.
Please try and think over the following code:
Code: Select all
'Prepare Bug-Situation
if dir("File.txt")<>"" then kill "File.txt"
open "File.txt" for binary as #1
put #1, 1, "Hello"+chr(10,10)+"World!"
close #1
'Bug in action :-)
dim tmpStr as String
open "File.txt" for input as #1
do
if eof(1) then exit do
line input #1, tmpStr
print ":"+tmpStr
print lof(1) '<< ENDLESS LOOP when LOF(1) is called and chr(10, 10) occurs in file
if inkey = chr(27) then end
sleep
Loop
close #1
I think the program shouldn't hang up. Unix LFs are supported by "line input".