Post Reply 
Change the way LOCAL variable declaration works.
06-08-2014, 05:28 PM
Post: #1
Change the way LOCAL variable declaration works.
Change the way LOCAL variable declaration works.
It is impossible to do indirect addressing totally within the scope of a program, independent from the outside. I've read HAN'S explanations for indirect addressing but what he suggests only works if the variable is already defined before runnig the prg. or as an input while prg. starts. What I need is this: I have an expression x+y+z and I want to do something to it. I do 'algvar' and get the list of variables {x,y,z}. I can sort the list, change its content to strings etc. and this gives me pointers, Han's explanation, and so far is OK. I want now to declare LOCAL VARIABLES based on the list {x,y,z} that 'algvar' gave me and now it does not work anymore because if vars={x,y,z} and I do LOCAL vars(1), vars(2), vars(3) it gives me error because x, y, z is not declared and this negates indirect addressing dependent only on the scope of my prg. I think that this is because no command works inside the scope of the LOCAL variable declaration, this is what I think but I could be wrong. It would be nice if LOCAL variable declaration would accept for example: LOCAL vars(1), vars(2),.., CAS("something"), EXPR("something"); where for example vars ={x,y,z}.
Find all posts by this user
Quote this message in a reply
Post Reply 


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



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