> Apparently you can use "save"
> within a begingroup section to make variables local, so I am playing
> with that right now to see if I can work out how to use it.
Easy enough:
def l_u_foo
begingroup; %allow local variables to work
save scale, bar, baz; %declare local variables
string scale;
if known ATTR_scale:
scale:=ATTR_scale;
else:
scale:="m";
fi;
...
endgroup;
enddef;
I tried using vardef instead, but couldn't get it to work.
"save" actually temporarily saves the existing (global) value of a
variable, then restores is after the endgroup. But it has the effect of
creating a local variable.
_______________________________________________
Therion mailing list
[email protected]
https://mailman.speleo.sk/listinfo/therion