CAS command question

01042017, 08:25 PM
(This post was last modified: 01042017 08:27 PM by parisse.)
Post: #20




RE: CAS command question
When you write L9:={ 'x+y = 4', 'x+y > 4', 'x+y ≥ 4', 'x+y<4', QUOTE(x+y ≤ 4) }; the right side of := is evaled, since all expressions are quoted, it will set L9 to { x+y = 4, x+y > 4, x+y ≥ 4, x+y<4, x+y ≤ 4 }, without quotes. If expressions inside the definition of L9 were not quoted, then x, y and inequations would have been evaled themselve, here they are not.
If you are writing L8(I):=left(L9(I)); then L9(I) is evaled, but this time nothing is quoted anymore and x,y and operators are evaled. You would have to doublequote the original input to avoid evaluation at this step. DrD: you can not make something useful with a command that does not eval arguments except for a few exceptions (:= is an exemple of exception, it does not eval it's left argument). On the example above, left(L9(I)) would not do anything because L9(I) would not be replaced by the Ith element of L9. This thread make me realize that there is probably a need to make a small FAQ about CAS expressions and evaluation (something I teach to some of my students). Unless there is already something good enough on the net, perhaps Han you know some interesting ressource? (wikipedia seems a little bit too short, Fateman's paper too long) 

« Next Oldest  Next Newest »

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