Storing and recalling CAS quoted expressions
10-21-2018, 01:29 PM
Post: #1
 BruceH Senior Member Posts: 313 Joined: Dec 2013
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?
10-21-2018, 01:33 PM
Post: #2
 nbenm Junior Member Posts: 7 Joined: Oct 2018
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
10-21-2018, 01:49 PM
Post: #3
 Tim Wessman Senior Member Posts: 2,240 Joined: Dec 2013
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 the HP calculator group, the views and opinions I post here are my own.
10-21-2018, 06:02 PM
Post: #4
 parisse Senior Member Posts: 1,136 Joined: Dec 2013
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.
10-23-2018, 10:40 PM
Post: #5
 BruceH Senior Member Posts: 313 Joined: Dec 2013
RE: Storing and recalling CAS quoted expressions
Thanks Bernard.
 « Next Oldest | Next Newest »

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