|
Post by bitvast on Jun 19, 2014 13:46:20 GMT 1
When you input a number from the terminal you cannot correct it because using the BACKSPACE key generates control characters. Is this a limitation of BaCon or can it be fixed?
|
|
|
Post by bigbass on Jun 19, 2014 14:24:56 GMT 1
Hey bitvast
You can correct with backspace with this type of input in bacon
'--- input-test.bac INPUT "Type a string ",a$ PRINT "You entered the following: ", a$
INPUT "Type a number ",b PRINT "You entered the following number: ", b
or if you give an example of the problem we can test to see if we get the same results or not
It may be a problem reading your keyboard's backspace key Try ctrl+backspace and see if that works or not
If the code snippet still doesn't work for you (use "locate bashrc" depending on the linux you are using)
Joe
|
|
|
Post by bitvast on Jun 19, 2014 15:09:43 GMT 1
Hi Joe,
Ctrl + BACKSPACE works, thanks. Alternatively I suppose you could use strings and then convert with VAL() before using them in calculations.
|
|
|
Post by Pjot on Jun 20, 2014 20:28:37 GMT 1
For me, BACKSPACE works as it should (no control characters), this is on Linux Mint.
Not sure what causes your issue, maybe the kind of terminal you are using, for example xterm? With MATE terminal it works as it should.
BR Peter
|
|
|
Post by bitvast on Jun 21, 2014 8:23:55 GMT 1
Hi Peter,
I was using the default terminal in Bacongui, which is xterm (xterm -hold -sb -geometry 90x30 -e @), but changing to xfce4-terminal has fixed the problem. Cheers.
|
|