![]() |
[HP-Prime] Picking elements from a List in a program - Printable Version +- HP Forums (https://archived.hpcalc.org/museumforum) +-- Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum-1.html) +--- Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum-2.html) +--- Thread: [HP-Prime] Picking elements from a List in a program (/thread-255785.html) |
[HP-Prime] Picking elements from a List in a program - Jean-Michel - 11-14-2013 Hello Re: [HP-Prime] Picking elements from a List in a program - Tim Wessman - 11-14-2013 I'd recommend storing the return from mouse into a local variable. The reason why is that it is an EXACT snapshot of the instant that command is evaluated. Thus you have the potential to check the state, then in the few ms between when you check it and begin to try and evaluate the state may have changed. Then you can use direct indexing myvar(1,1) and so on to access the specific pieces directly. Note you can also do MOUSE(1) or MOUSE(2) which returns -1 if nothing is there, or else the list.
TW
Re: [HP-Prime] Picking elements from a List in a program - Jean-Michel - 11-14-2013 Thanks Tim for your advice. Edited: 14 Nov 2013, 5:54 p.m.
Re: [HP-Prime] Picking elements from a List in a program - dg1969 - 11-15-2013 I mean you can try myvar(2,3) => 7 with myvar:={{1,2,3,4},{5,6,7,8}}
friendly :o)
|