Bug #52
Space being appended to end of file read
Start date:
01/21/2020
Due date:
% Done:
0%
Estimated time:
Affected version:
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
Updated by Baptiste Pillot over 4 years ago
- Description updated (diff)
- Assignee set to Francois Lionet
Updated by Francois Lionet about 4 years ago
- Status changed from New to Feedback
Can you give me the "Wordlist" file?
Updated by Paul Kitching about 4 years ago
- File FileBug.PNG FileBug.PNG added
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.