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
if dir("File.txt")<>"" then kill "File.txt"
open "File.txt" for binary as #1
put #1, 1, "Hello"+chr(10,10)+"World!"
'Bug in action :-)
dim tmpStr as String
open "File.txt" for input as #1
if eof(1) then exit do
line input #1, tmpStr
print lof(1) '<< ENDLESS LOOP when LOF(1) is called and chr(10, 10) occurs in file
if inkey = chr(27) then end
If lof is called an endless loop is the result. If you remove the line with "lof" the program doesn't hang up - it behaves normal.
I think the program shouldn't hang up. Unix LFs are supported by "line input".