sandyrepope
26-02-2007, 22:53
I don't know if this is a bug in console_readline or not. If you input some characters using console_readline and try to edit it with the backspace key, then after you press enter/return the string will have the backspace in the string.
I didn't expect it to do this. Is that what it should do?
Try it with this short script:
uses "console"
dim guess as string
dim x as long
Console_write("Type something here: ")
guess = console_readline()
Console_writeline("guess is "+guess)
console_writeline("There are "+len(guess)+" characters in guess")
for x = 1 to len(guess)
console_writeline asc(mid$(guess,x,1))
next
Maybe it should do this? Type in 'apples' then hit the backspace and then 'enter'. The string will now have 7 characters instead of 5.
Thanks
Sandy
I didn't expect it to do this. Is that what it should do?
Try it with this short script:
uses "console"
dim guess as string
dim x as long
Console_write("Type something here: ")
guess = console_readline()
Console_writeline("guess is "+guess)
console_writeline("There are "+len(guess)+" characters in guess")
for x = 1 to len(guess)
console_writeline asc(mid$(guess,x,1))
next
Maybe it should do this? Type in 'apples' then hit the backspace and then 'enter'. The string will now have 7 characters instead of 5.
Thanks
Sandy