So, I've been making lots of programs that take number key input from people, and lots of times I do something involving converting K=92 to 1, K=82 to 4, etc., but I think the most efficient way would be to iterate through a list of getKey values (ex. ʟKEYSθ={92,93,94,82,83,84}) and return the index of value K. Essentially, if I press the [1] key, the program should search through the list and return what index 92 was in (and so on).
In JavaScript, you would do "list.indexOf(value)", so I'm asking if there's an equivalent to that in TI-Basic. I had another question, but I forgot what it was. I'll edit the post once I remember.
Edit: Jacobly showed the equivalent (And it works!): max((list=K)cumSum(1 or list
In JavaScript, you would do "list.indexOf(value)", so I'm asking if there's an equivalent to that in TI-Basic. I had another question, but I forgot what it was. I'll edit the post once I remember.
Edit: Jacobly showed the equivalent (And it works!): max((list=K)cumSum(1 or list