Graphic cursor problem
|
01-12-2021, 12:13 PM
(This post was last modified: 01-12-2021 12:17 PM by C.Ret.)
Post: #4
|
|||
|
|||
RE: Graphic cursor problem
(01-09-2021 09:20 PM)cahlucas Wrote: [...] Based on the code, what could possibly be wrong or what needs to be inserted in order for the program to work in the end? Sincerely, Karel. I am not sure, but I see a potential problem in the way index is initialized. To ease my explanation, I copy your code simplifying the tests which appear to be correct. Code:
The variable index is correctly set only when the user touch’s in one of the four Touch-Zone as expected, respectively 1 2 3 or 4 depending of the zone. But, what happen to index when the user miss any of the four zones ? I can not see where the variable index is set to a specific value (I may propose set to 0) to indicate a wrong touch ! And, more important, in the last portion of the code, no test is made to verify that index is correctly set and one of the four Touch Zone was actually touched : Code:
I hope this observation help a bit... Debugging on the HP Prime is sometime really hard, a source of stress and time consuming... (I just spend two hours realizing that the incorrect behavior of my CAS function was due to a capitalized local variable name, the calculator was using the global variable same value each time what ever were the specific samples I introduce ... How fool are we on ours doggy horses ?? ) Best Regards. C.Ret |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Graphic cursor problem - cahlucas - 01-09-2021, 09:20 PM
RE: Graphic cursor problem - Han - 01-10-2021, 09:45 PM
RE: Graphic cursor problem - cahlucas - 01-12-2021, 05:39 AM
RE: Graphic cursor problem - Han - 01-13-2021, 02:27 AM
RE: Graphic cursor problem - C.Ret - 01-12-2021 12:13 PM
RE: Graphic cursor problem - cahlucas - 01-13-2021, 05:52 AM
|
User(s) browsing this thread: 1 Guest(s)