Bug #52
closed
Space being appended to end of file read
Added by Neil Ives almost 5 years ago.
Updated over 4 years ago.
Description
Open In 1,"WordList.txt"
For n = 0 to 5
Input #1,Word$
Print "-" + Word$ + "-"
Next
close 1
See picture for output:
Using Version 0.9.3,(version drop-down needs updating)
Files
Still the same in 0.9.3.1
- Description updated (diff)
- Assignee set to Francois Lionet
- Status changed from New to Feedback
Can you give me the "Wordlist" file?
The latest version of AOZ has this fixed
I'm still getting this problem. I have to remove the last character from each read or my comparison with an entered search doesn't find a match. Oddly, it's not showing the space in a 'print', but does show something in a 'len':
#manifest: "pc"
#displayWidth:1920
#displayHeight:1080
#fullScreen:true
#fps:false
#splashScreen:false
Open In 1,"test.txt"
Input #1,test1$
Input #1,test2$
close 1
print "'"+test1$+"'"+str$(len(test1$))
print "'"+test2$+"'"+str$(len(test2$))
if test1$="test1" then print "test1 found"
if test2$="test2" then print "test2 found"
wait key
My file has this in it:
test1
test2
The last line works, but the others don't. I have to put a carriage return after the test2 for it to be consistent, then I can remove the last char from each one so a comparison will return a true on another variable with the same string.
The output shows that test2 is found. See attached pic.
- Status changed from Feedback to Closed
Also available in: Atom
PDF