Post Reply 
Existing CAS commands --> Prime discussion
11-08-2019, 08:12 AM
Post: #71
RE: Existing CAS commands --> Prime discussion
(11-08-2019 01:00 AM)toml_12953 Wrote:  
(11-08-2019 12:57 AM)compsystems Wrote:  increment(a,1) stores the result of a: = a+1

No, it doesn't. It increments a temporary copy of a, not a itself. That's why you have to store the result back to the variable a yourself.

a:=increment(a,1)

In Xcas, increment(a,1) gets turned into a+=1, incrementing a in place.

— Ian Abbott
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Existing CAS commands --> Prime discussion - ijabbott - 11-08-2019 08:12 AM



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