Post Reply 
Change the way LOCAL variable declaration works.
06-08-2014, 07:11 PM
Post: #3
RE: Change the way LOCAL variable declaration works.
(06-08-2014 06:45 PM)Han Wrote:  You can create CAS variables and clean them up afterward. Keep your variable names as strings, and initialize them through the CAS.

Code:

vars:={"a", "b", "c"};
tmp:=vars(1)+":=0";
CAS(tmp); // use a for loop to init all the vars if you want to init all of them

// do your stuff 

purge(vars(1));

You can also create a corresponding list of default values if you don't want to initialize to 0.

Thank you for the help.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Change the way LOCAL variable declaration works. - John P - 06-08-2014 07:11 PM



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