'one key input 2021-10-15 TempoDiBasic
' MODification of structure of program
' following the scheme posted by Steve and discussed with Bplus
choice$ = "0123456789"
choosen$ = ""
getInput choice$, choosen$
choice$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
choosen$ = ""
getInput choice$, choosen$
Input "Enter set of one character choice...", choice$
choosen$ = ""
getInput choice$, choosen$
Sub getInput
(cho$
, choo$
) SecondHalf
= Right$(cho$
, leng
- Int(leng
/ 2)) ShowItem f, s, f1, s1, FirstHalf, SecondHalf
' if user don't press a key, it starts countdown to confirm choice
tim = 0
' if user doesn't press a key and time waited is more the 4 second and choice is confirmed
If f
= " " Then getInput SecondHalf
, choo$
Else getInput FirstHalf
, choo$
f = "þ"
s = " "
f1 = 29
s1 = 15
f = " "
s = "þ"
f1 = 15
s1 = 29
Print f
+ Firsthalf
+ f
+ " ";
Print "press spacebar to choose, wait more than 4 second to select"