HP Forums
Storing and recalling CAS quoted expressions - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Storing and recalling CAS quoted expressions (/thread-11624.html)



Storing and recalling CAS quoted expressions - BruceH - 10-21-2018 01:29 PM

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?


RE: Storing and recalling CAS quoted expressions - nbenm - 10-21-2018 01:33 PM

(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


RE: Storing and recalling CAS quoted expressions - Tim Wessman - 10-21-2018 01:49 PM

I believe any simple evaluations such as basic math will be evaluated by the store operator. Anything more complex will not.


RE: Storing and recalling CAS quoted expressions - parisse - 10-21-2018 06:02 PM

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.


RE: Storing and recalling CAS quoted expressions - BruceH - 10-23-2018 10:40 PM

Thanks Bernard.