Post Reply 
Storing and recalling CAS quoted expressions
10-21-2018, 01:29 PM
Post: #1
Storing and recalling CAS quoted expressions
In the CAS, if I do
Code:
a:='2+2'

does a now store 4 or '2+2'? Is there a way of telling? If the latter, is there a way of recalling the original '2+2' rather than 4?
Find all posts by this user
Quote this message in a reply
10-21-2018, 01:33 PM
Post: #2
RE: Storing and recalling CAS quoted expressions
(10-21-2018 01:29 PM)BruceH Wrote:  In the CAS, if I do
Code:
a:='2+2'

does a now store 4 or '2+2'? Is there a way of telling? If the latter, is there a way of recalling the original '2+2' rather than 4?

Hi,

I'm not sure but it seems that:
1 - a:='2+2' stores 4
2 - a:="2+2" stores the string 2+2
Find all posts by this user
Quote this message in a reply
10-21-2018, 01:49 PM
Post: #3
RE: Storing and recalling CAS quoted expressions
I believe any simple evaluations such as basic math will be evaluated by the store operator. Anything more complex will not.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
10-21-2018, 06:02 PM
Post: #4
RE: Storing and recalling CAS quoted expressions
You can control evaluation with the second optional argument of eval.
For example a:='2+2' followed by eval(a,1) will return 2+2, assuming that auto-simplification level is 0.
Find all posts by this user
Quote this message in a reply
10-23-2018, 10:40 PM
Post: #5
RE: Storing and recalling CAS quoted expressions
Thanks Bernard.
Find all posts by this user
Quote this message in a reply
Post Reply 




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