keyboard input
Posted: Thu Jan 09, 2025 1:22 pm
Hello!
Refining my first program and wondering how to limit key presses to the options given in an input statement - I'm fine with numbers i.e.
10 input "choose 1,2,3";i$
20 if i$>3 then goto 10
30 if i$=1 goto 40
40 if i$=2 goto 50 etc
But not sure how to do it with alphanumeric options?
10 input "choose 'y' or 'n'";i$
I can see that if it was just a single character I could use:
20 if i$ <> y then got to 10
but not sure how to do it with multiple options.
Any help appreciated!
Jason
Refining my first program and wondering how to limit key presses to the options given in an input statement - I'm fine with numbers i.e.
10 input "choose 1,2,3";i$
20 if i$>3 then goto 10
30 if i$=1 goto 40
40 if i$=2 goto 50 etc
But not sure how to do it with alphanumeric options?
10 input "choose 'y' or 'n'";i$
I can see that if it was just a single character I could use:
20 if i$ <> y then got to 10
but not sure how to do it with multiple options.
Any help appreciated!
Jason