Post Reply 
CopyVar
09-09-2017, 01:39 PM
Post: #2
RE: CopyVar
(09-09-2017 11:58 AM)webmasterpdx Wrote:  Can anyone explain the difference between these 2 lines....in terms of what happens?
A:=B;
CopyVar(A,B);

The docs say the second line copys the storage area that B holds into A's storage area. I see no difference between that an A:=B;.....
Alternatively, give me an example where they would not be the same...

The difference is that CopyVar doesn't evaluate the source variable. Here's a CAS example:

aa:='1+2' <-- this stores the algebraic expression '1+2' into aa.
bb:=aa <-- this stores the evaluated result, 3, into bb.
CopyVar(aa,cc) <-- this stores the unevaluated expression '1+2' into cc.

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
CopyVar - webmasterpdx - 09-09-2017, 11:58 AM
RE: CopyVar - Joe Horn - 09-09-2017 01:39 PM
RE: CopyVar - ji3m - 09-09-2017, 03:01 PM
RE: CopyVar - webmasterpdx - 09-09-2017, 10:04 PM
RE: CopyVar - Tim Wessman - 09-11-2017, 03:12 PM



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