Hi Everyone,
I'm working on a project where I have to define a lot of local variables and will reuse those naming conventions each loop. Given the scope of the project I would like to wipe the locals manually to prevent 'bleed-through' from one loop to the next. However, there are locals that I periodically define before and after that I would like to preserve.
Is there a way to wipe a range of locals?
Apologies for the bolded pseudo-code, but it conveys the basic essence and the desired result in my example. I've gone through the pmacro documentation but I can't find anything quite describing what I'm talking about.
Is there a way to do this? I know there are work arounds to prefixing locals and dropping based on prefixes, but that will be annoying to redefine every local. Alternatively I could use globals to keep the macros I want and drop locals, but I'd prefer to avoid globals if possible.
Thanks for any insight into this!
Cheers,
David.
I'm working on a project where I have to define a lot of local variables and will reuse those naming conventions each loop. Given the scope of the project I would like to wipe the locals manually to prevent 'bleed-through' from one loop to the next. However, there are locals that I periodically define before and after that I would like to preserve.
Is there a way to wipe a range of locals?
Apologies for the bolded pseudo-code, but it conveys the basic essence and the desired result in my example. I've gone through the pmacro documentation but I can't find anything quite describing what I'm talking about.
Code:
. local a = 1 . local b = 2 . local c = 3 . local d = 4 . local e = 5 . macro list _a: 1 _b: 2 _c: 3 _d: 4 _e: 5 macro drop _b - _d . macro list _a: 1 _e: 5
Thanks for any insight into this!
Cheers,
David.
Comment