(89) CopyVar var1, var2

Copies the value of var1 into var2. Whereas Store copies the result of an expression into another variable, CopyVar will copy the value of the variable itself.

This will throw an "Undefined Variable" error if var1 is undefined.


:Disp y      - prints x
:Disp y      - prints 5
:CopyVar y,z 
:Disp y      - prints 7
:Disp z      - prints 7
:Disp t      - prints 5

After the first line "x" is stored in y. The second line confirms this. The third line stores 5 into x. the fourth line displays 5 because "x" goes to "5", and is returned.

In the next two lines, y's value, "x", is copied to z so that z's value is "x". The result of the equation "y", "5", is stored in t.

The next four lines confirm this. When x's value is changed to 7, both y and z reflect this change, while t does not.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.