
Local variables by reference?

jslowik
variable var = 5
print func("var")
...would print 5.
I'd like to store the local variables/strings generated by some Igor functions (e.g. wavestats) in a wave, but want the saved outputs to be determined by instructions in a string rather than hardcoded into the function (e.g. the user might pass "V_avg;V_sdev;V_maxloc;" with the intent of generating an output wave holding these values). However, wavestats' output are local rather than global variables, so the $-based reference won't work. Is there a reference system for local variables, or a function like the above that can do this? Many thanks!!
You would have to do something like this:
November 7, 2013 at 11:37 am - Permalink