Post Reply 
At this point, if I were to vote for new features....
06-28-2017, 02:19 AM
Post: #6
RE: At this point, if I were to vote for new features....
OK, I think I've figured it out....
m:=[1 2 3];
l:=m;
m[1]=<4; is actually array_sto(4,at(m,0)); So, it gets stored in both m and l.
m returns [4 2 3]
l returns [4 2 3]

Now, if I do:
m[1]:=8; is actually at(m,0):=8; Here it only stores in m but not in l.
m returns [8 2 3]
l returns [4 2 3]

So, =< writes by reference, so when you type l:=m; it's just storing a reference to m in l....so the write causes both l and m to be written at once.
When := is used, only the variable m is written, so I think this operation causes m and l to be separated into 2 different vectors.

...or something like that :-)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: At this point, if I were to vote for new features.... - webmasterpdx - 06-28-2017 02:19 AM



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