Post Reply 
HP PPL How to pick a CAS expression off the stack?
12-11-2013, 06:53 PM
Post: #1
HP PPL How to pick a CAS expression off the stack?
Suppose I have the following three CAS results on the right hand side of the "stack":

SIN(x)
COS(x)
TAN(x)

From within a program, I'd like to store expression SIN(x) in a variable eq1, skip the COS(x) expression, and store expression TAN(x) in variable eq2. This was simple in previous RPN calcs, but I'm not sure how to do this in the Prime?

Code:

EXPORT READ_FROM_STACK()
  LOCAL eq1, eq2;
  code to pick expressions off the stack....
END;

I was looking for something in the spirit of:

Code:

sto(Ans(1),eq1);

but I haven't had any success yet.
Find all posts by this user
Quote this message in a reply
12-11-2013, 07:34 PM
Post: #2
RE: HP PPL How to pick a CAS expression off the stack?
RPN is currently not implemented for CAS view nor is it supported in programming (at the moment).

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
12-11-2013, 08:06 PM
Post: #3
RE: HP PPL How to pick a CAS expression off the stack?
I am aware that RPN is not available for this task... if it were, I'd be in familiar waters. But certainly there must be a way to access the expressions on screen? If it's sitting there, it must be stored somewhere. I don't want to resort to manually storing each expression in a variable prior to running the program...
Find all posts by this user
Quote this message in a reply
12-12-2013, 02:49 AM
Post: #4
RE: HP PPL How to pick a CAS expression off the stack?
Prime has three distinct onscreen stacks:

1. Textbook/Algebraic history stack
2. RPN stack
3. CAS history stack

Which one do you want to access in your programs?

-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
12-12-2013, 04:18 AM
Post: #5
RE: HP PPL How to pick a CAS expression off the stack?
I would like to access the CAS history. I believe the Textbook/Algebraic stack is already well documented.

Thanks
Find all posts by this user
Quote this message in a reply
12-12-2013, 03:43 PM
Post: #6
RE: HP PPL How to pick a CAS expression off the stack?
Hello,

Sorry, no ways that I know of.
Maybe bernard has a trick to do that...

cyrille
Find all posts by this user
Quote this message in a reply
Post Reply 




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