Re: Proposal - wp34s GETKEY semantics and other input functions Message #16 Posted by Paul Dale on 28 Apr 2011, 7:32 a.m., in response to message #4 by Walter B
Quote: The last sentence isn't quite clear to me. I'd have searched for the key pressed via RCL nn with nn being the one used in KEY? nn before. TIA for enlightenment :-)
KEY? doesn't say "store a future key press into a register". Rather, it asks "what key is pressed NOW?"
So we can have a wait for key press sequence:
LBL 00
PSE 99
KEY? X
RTN
GTO 00
Thus, XEQ 00 will keep looping until a key really has been pressed.
The key code is in X.
However, there are other uses that don't involve just waiting for the key press -- the program can get on with other things.
e.g. to allow a lengthy calculation to be stopped at a nice place unlike R/S that stops it immediately. E.g. after the next term in a series is summed.
Another possibility would be to allow a program to looks like it has a custom catalogue and which responds properly to arrow keys.
- Pauli
|