Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: AngelFish on January 05, 2011, 04:53:48 pm
-
I'm trying to get a lookup table to work, but something odd keeps happening. What I'm trying to do is accept some key input and find the location of the key code within the array. Here's some example code:
[0123456789ABCDEF36]->Str1
...
getkey->K
For(A,0,8
If K=e{Str1+A}
Goto BRK
End
End
Lbl BRK
where the e is scientific notation E.
This should store the array offset in A, but it doesn't seem to be working. For example, if you were to press 2nd (keycode=54), then it would return 8 in A.
-
You should try using inData() :D
[0123456789ABCDEF3600]->Str1
...
getKey->K
If K
If inData(K,Str1)->A
Goto BRK
End
End
...
Lbl BRK
-
/me didn't even know that was a command :P
Thanks.
-
:O inData is a command similar to inString, i think?
-
Yup. Actually, the token for inData() is inString() lol
-
i thought so :P
-
Except that inData is exactly the opposite (in syntax) from inString. inString is inString(STRING_TO_SEARCH_IN,STRING_TO_FIND) while inData is inData(BYTE_TO_FIND,STRING_TO_SEARCH_IN).