Post Reply 
How to pass by reference in XCAS ?
10-27-2020, 08:14 AM
Post: #8
RE: How to pass by reference in XCAS ?
Hi, parisse

We get pass-by-reference also with +=. Is this a feature, or a bug ?

XCas> l:=[1,2]; m:=l; l[1]=<3; m        → [1,2],[1,2],[1,3],[1,3]
XCas> l:=[1,2]; m:=l; l[1]+=1; m        → [1,2],[1,2],[1,3],[1,3]
XCas> l:=[1,2]; m:=l; l[1]:=l[1]+1; m  → [1,2],[1,2],[1,3],[1,2]
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How to pass by reference in XCAS ? - Albert Chan - 10-27-2020 08:14 AM



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