Hi,
I'm seem to have a bit of a bug! I'm trying to read a text file but when the 'read string' line trys to read a long line DBP crashes or returns to the editor. I'm guessing over 255 characters .
Help please or my project is stuffed already. I've included the code and the text file.
global TL$ as string
if file exist("c:\test.txt")
open to read 1,"c:\test.txt"
if file open(1)=1
while file end(1)= 0
read string 1,TL$
print TL$
endwhile
close file 1
endif
endif
Save this in c: as test.txt
LINE 1
LINE 2
LINE 3
LINE 4
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
LINE 5
LINE 6