[Main]
Title=How can I copy a variable from one folder to another?

[Top]
<TABLE CELLPADDING="4"><TR><TD VALIGN="TOP"><B>Q:</B></TD><TD>
I don't understand how to copy a symbol (TI-Basic variable) from one folder to
another. As I can see, <A HREF="$$LINK(vat.h/SymCpy)">SymCpy</A> doesn't copy the
entire symbol, just the name!?
</TD></TR><TR><TD VALIGN="TOP"><B>A:</B></TD><TD>
Moving symbols is quite easy (using <A HREF="$$LINK(vat.h/SymMove)">SymMove</A>), but copying
is not so straightforward. Principally, you need to create a new one, and to
copy the content of the original one into a new one. Fortunately, it is
possible to use <A HREF="$$LINK(bascmd.h/cmd_copyvar)">cmd_copyvar</A> from
<A HREF="$$LINK(bascmd.h/)">bascmd.h</A>.
As it is TI-Basic call, it is highly recommended to execute it
under a <A HREF="$$LINK(error.h/TRY)">TRY</A>...<A HREF="$$LINK(error.h/ONERR)">ONERR</A>...<A HREF="$$LINK(error.h/ENDTRY)">ENDTRY</A>
block.
</TD></TR></TABLE>
