setexpression of a variable?
Posted: 06 Feb 2013 20:45
Hi - is this possible?
I am creating object names dynamically with the use of arraytostring, which normal works fine, but in this case - I want to be able to change global variables, but not sure how to go about it.
the variable is
LOOP1.lp
of course this works:
LOOP1.lp=1;
but i can't use that structure since i am repeating the function with this attempt assuming the expression name is the name of the global variable - in this case 'lp'
ll has been defined elsewhere (numerical version of LOOP)
decl i,ar,size=9;
for(i=0;i<size;i++){
ar=arraytostring({ll,i+49});
setattribute(findobject(ar),'lp',i+1);
}
any ideas?
thanks!
I am creating object names dynamically with the use of arraytostring, which normal works fine, but in this case - I want to be able to change global variables, but not sure how to go about it.
the variable is
LOOP1.lp
of course this works:
LOOP1.lp=1;
but i can't use that structure since i am repeating the function with this attempt assuming the expression name is the name of the global variable - in this case 'lp'
ll has been defined elsewhere (numerical version of LOOP)
decl i,ar,size=9;
for(i=0;i<size;i++){
ar=arraytostring({ll,i+49});
setattribute(findobject(ar),'lp',i+1);
}
any ideas?
thanks!