Getting the most from the stack.
05-15-2021, 08:44 PM (This post was last modified: 05-15-2021 08:45 PM by matalog.)
Post: #1
 matalog Member Posts: 206 Joined: May 2021
Getting the most from the stack.
I carry out simple equations all day long on the calculator, It would be a big advantage to me, to get the most I possibly could from the history of stored previous calculations.

I mean, there is even a possibility that once in a while, if I could access the calculations I performed last week, that it would be helpful.

I have read that the HP Prime has a fixed stack, with 128 results.

Is there any conceivable way for me to increase that with a program or some advanced method?

Is there a way for me to set the calculator to automatically save the stack to a file, after 128 calculations?

You see what I'm getting at here, I would like a way to store as much of a history of calculations as possible, and be able to access them, without necessarily having to count calculations, and then save the stack to a file myself.

Can anyone think of any way to achieve something like this?
05-16-2021, 06:05 AM
Post: #2
 Stevetuc Member Posts: 299 Joined: Jan 2014
RE: Getting the most from the stack.
(05-15-2021 08:44 PM)matalog Wrote:  [...]
I have read that the HP Prime has a fixed stack, with 128 results.

Is there any conceivable way for me to increase that with a program or some advanced method?

Is there a way for me to set the calculator to automatically save the stack to a file, after 128 calculations?
[...]

Can anyone think of any way to achieve something like this?

Not automatically, but this code allows the stack to be saved to a note and recalled using a user defined key:

Code:
 EXPORT stack2note(x) BEGIN LOCAL stack1:=""; 2▶Entry; //set entry mode to RPN REPEAT  stack1+Ans(x)+" "▶stack1; x-1▶x; UNTIL x==0; stack1▶Notes("stk"); END; KEY K_5 BEGIN LOCAL stack1:=""; 2▶Entry; Notes("stk")▶stack1; RETURN stack1; END;

I haven't refined it, but it's enough to show the concept.
Set up desired stack levels in rpn mode, then to avoid disturbing the stack, switch to ALG mode and enter stack2note(n) where n is the desired number of stack levels to save. The program switches to RPN mode and saves the stack levels to Notes("stk"). There must be at least as many stack levels defined as n.

This will save a note called "stk" which contains your stack levels.
(Shift Notes will allow you to examine the note - it contains the stack levels sequentially)

To recall the stack, Shift User 5 will read the contents of Notes("stk") to the RPN command line. Pressing Enter will restore the stack levels.

You may be able to adapt this method to suit your needs?
05-16-2021, 10:16 PM (This post was last modified: 05-16-2021 11:09 PM by matalog.)
Post: #3
 matalog Member Posts: 206 Joined: May 2021
RE: Getting the most from the stack.
I generally work in textbook entry mode, so that is the version of the stack I would need to save.

Do you know if there is a way to access the left hand numbers in the calculators visual history?

As your program uses there, Ans(1), Ans(2) etc will give the results of calculations that appear on the right hand side of the history, It would be useful to also have the left hand side, the part that created the results, so that I could also check what I used to get the results.

Are those accessible by a term?

I can actually just hit the save button on the screen at any time, but the input to change the name of the saved stack is time consuming and not convenient on the device.

Is there a way to activate a stack save, like the option that is on the Home screen, but with control ofer the string that becomes the filename, so that I could increment a variable at the end of the string, and therefore automatically change the name to another, or indeed, just have the name the current time and date?
05-16-2021, 10:50 PM
Post: #4
 tcab Member Posts: 188 Joined: Dec 2017
RE: Getting the most from the stack.
I’m pretty sure there is a stack saving feature on the latest beta firmware.
05-17-2021, 08:06 AM
Post: #5
 Stevetuc Member Posts: 299 Joined: Jan 2014
RE: Getting the most from the stack.
(05-16-2021 10:50 PM)tcab Wrote:  I’m pretty sure there is a stack saving feature on the latest beta firmware.

Confirmed that the the beta allows full load and save of
Settings
Calculation inputs
Results
Home vars
User vars
Matrices
Lists

Each of the above individually settable options

I just tried on textbook history and it works fine
05-17-2021, 09:01 PM
Post: #6
 matalog Member Posts: 206 Joined: May 2021
RE: Getting the most from the stack.
Yes, I had seen that, I was wondering if it would be possible to initiate it through a program, and set a string as the filename while saving through a program?
05-17-2021, 09:18 PM
Post: #7
 Stevetuc Member Posts: 299 Joined: Jan 2014
RE: Getting the most from the stack.
(05-17-2021 09:01 PM)matalog Wrote:  Yes, I had seen that, I was wondering if it would be possible to initiate it through a program, and set a string as the filename while saving through a program?
I don't think that's possible currently
05-21-2021, 06:32 PM (This post was last modified: 05-21-2021 06:34 PM by Liamtoh Resu.)
Post: #8
 Liamtoh Resu Member Posts: 116 Joined: May 2021
RE: Getting the most from the stack.
I am new to the prime g2.

The "stack2notes" program pops up an error message before "BEGIN" after the "KEY K_5" line while doing a CHECK on it..

Also, where is the "USER" key? I can see the "USER" on the screen after pressing the "TOOLBOX" key.

Thanks.
05-21-2021, 06:55 PM
Post: #9
 Stevetuc Member Posts: 299 Joined: Jan 2014
RE: Getting the most from the stack.
(05-21-2021 06:32 PM)Liamtoh Resu Wrote:  I am new to the prime g2.

The "stack2notes" program pops up an error message before "BEGIN" after the "KEY K_5" line while doing a CHECK on it..

Also, where is the "USER" key? I can see the "USER" on the screen after pressing the "TOOLBOX" key.

Thanks.

I just cut and paste the listing from this thread into the android app and no errors. Did you type the listing into the g2?

The USER key is the Shifted Help key.
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)