Re: TIB: GetKey


[Prev][Next][Index][Thread]

Re: TIB: GetKey




what kind of GetKey program did you want?
The following is a GetKey program translated from my 92 into 83 as best I can:

GetKeyL
0->C
Lbl A
0->A
Lbl B
Getky()->A
If A=0:Goto B
For(B,1,LDim(L1))
If A=L1(B):B->C
End
If C=0:Goto A

Store the keys that you want the program to check for in list L1.  The program
will wait for a key to be pressed, check the list if it's an enabled key, and
then returns the location in the list of the key that was pressed in the
variable C.  For example:

{11,24,25,26,34,105}->L1
prgm(Getkey

would return 1 if [Y=], 2 if LEFT, 3 if UP, 4 if RIGHT, 5 if DOWN, and 6 if
ENTER were pressed.

-Rob