HP Forums

Full Version: HP PPL How to pick a CAS expression off the stack?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
RPN is currently not implemented for CAS view nor is it supported in programming (at the moment).
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...
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-
I would like to access the CAS history. I believe the Textbook/Algebraic stack is already well documented.

Thanks
Hello,

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

cyrille
Reference URL's