Splitting Lists on Prime G2 - Help Needed - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: Splitting Lists on Prime G2 - Help Needed (/thread-19605.html) |
Splitting Lists on Prime G2 - Help Needed - PrimeG2_hp48sx - 03-01-2023 02:55 PM Hi everyone, On my old HP48SX, I used to be able to split a list into individual elements on the stack by simply pressing EVAL. It was really useful, especially when working in RPN mode. However, I'm struggling to figure out how to do the same thing on my Prime G2. I've tried different methods, but nothing seems to work. I believe this is a basic feature that should be available on the Prime G2, but I can't seem to find it. EVAL does not work. Can anyone provide any clues or tips on how to achieve this? Your help would be greatly appreciated. Thanks in advance. RE: Splitting Lists on Prime G2 - Help Needed - BruceH - 03-02-2023 08:23 PM There is no function to put the contents of a list onto the stack because the Prime has no stack. What you see on screen is a history of previous answers, not a stack in RPN or RPL terms. RE: Splitting Lists on Prime G2 - Help Needed - Joe Horn - 03-02-2023 08:31 PM (03-02-2023 08:23 PM)BruceH Wrote: There is no function to put the contents of a list onto the stack because the Prime has no stack. Even when it's in RPN mode? The Prime itself (and its manual) call it a "stack". RE: Splitting Lists on Prime G2 - Help Needed - PrimeG2_hp48sx - 03-02-2023 10:08 PM Well, in RPN-mode it definitely has a stack. It even has a swap command on the ","-key that swap the two lowest items on the stack. And you can build a pretty large stack if you wish, even though around 5 items often is enough. Anyway, thank you for trying to help with my problem. Anyone else? Can it be done with a simple program? RE: Splitting Lists on Prime G2 - Help Needed - Didier Lachieze - 03-02-2023 11:37 PM (03-02-2023 10:08 PM)PrimeG2_hp48sx Wrote: Anyone else? Can it be done with a simple program? Stack operations in RPN mode on the Prime are very limited and a program cannot manipulate the stack. However we can use some tricks to achieve "almost" what you need. The following program assigns to the user key Shift Right_arrow a function which returns to the command line the different elements of the list in the stack level 1 (if there’s one), then pressing Enter will push these elements to the stack. Code: KEY KS_Right() Note: I’ve done limited testing so there may be some cases where it doesn’t work correctly. RE: Splitting Lists on Prime G2 - Help Needed - PrimeG2_hp48sx - 03-05-2023 10:56 PM Cool! Clever! Thanks. RE: Splitting Lists on Prime G2 - Help Needed - BruceH - 03-06-2023 12:35 PM (03-02-2023 10:08 PM)PrimeG2_hp48sx Wrote: Well, in RPN-mode it definitely has a stack. It even has a swap command on the ","-key that swap the two lowest items on the stack. And you can build a pretty large stack if you wish, even though around 5 items often is enough. Apologies - your original message referred to the stack on the 48 and I hadn't realised you'd already found stack mode on the Prime. As you've seen, it's so limited I didn't want to get your hopes up. :-) RE: Splitting Lists on Prime G2 - Help Needed - komes - 03-10-2023 10:24 AM Hi, Here is another option, a small program that puts on stack (in RPN mode) all elements from your list. But it does not work automatically. This is how to do it: 1. Run program with your list as an argument. The elements will be displayed in Terminal. 2. Copy everything as it is with Shift-Copy. 3. Clear Terminal window with Backspace. 4. Go back to Home screen (in RPN mode!). 5. Paste what you have copied with Shift-Paste. 6. Press ENTER. Quote:EXPORT RPSTK(LL) It works for me, so maybe helps you too. Good luck. A.Z. |