HP 48GX Indefinite Loops
|
04-03-2022, 11:39 AM
Post: #13
|
|||
|
|||
RE: HP 48GX Indefinite Loops
(04-03-2022 01:59 AM)MNH Wrote: \<< 1 CF CSV DUP SIZE Hmmm.... several thoughts. See the above post about INOUT, which would make it easier for others to be able to test the code. Also, placing the code into a code block (see the "#" button above the text when typing a post/response) would at least preserve the original ascii text along with the intended indentation. It also makes it a little easier to copy and paste (IMHO). I loaded your program into an emulated 48GX for testing and stepped through the flow with SST. If I'm understanding things correctly, you're wanting the 'points' local to have a list with each line in it. That local is only a list for a very short time, however, namely when it is first created as an empty list with the local assignment operator (→). Your code replaces that list with a string assignment in the THEN clause by using STO instead of STO+. Also, if you want the strings to be in the same order they are encountered in CSV, then you'll want to swap the new string and 'points' prior to STO+ being executed. In its current form, your program simply concatenates the previous string with the final string and leaves it on the stack. I don't believe that's what you intended, but I could be confused about exactly what your code is trying to achieve. Stepping through the code, the main loop is terminated correctly if flag 1 is set. Have you tried single-stepping through the code to see what it is doing? In summary: If I change this Code: 'points' STO Code: 'points' SWAP STO+ Hope this helps! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)