
"Can't use $ in this way in a function"

rfreeman057
Function SwWave(a bunch of parameters)
Wave PositiveWave, NegativeWave
I use Sprintf to make strings that correspond to two wave names. The strings are called PosWavename and NegWavename and correspond to data waves that I have.
Before doing the comparisons, I try to set the value of these waves equal to the waves defined earlier as PositiveWave and Negative Wave
PositiveWave=$PosWavename
NegativeWave=$NegWavename
It fails at this point and gives me the error, "Can't use $ in this way in a function". If anyone has any knowledge that could help I'd greatly appreciate it.
Also attached the file, just in case my barebones description wasn't enough.
Your code has statements like this:
It is important to remember that a WAVE statement is BOTH a declaration AND an assignment, so
is different than:
And I'm not a big fan of passing parameters into a function through global strings like SVAR; that's what function parameter arguments are for.
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
July 18, 2012 at 03:58 pm - Permalink
July 19, 2012 at 08:50 am - Permalink
July 19, 2012 at 09:23 am - Permalink