
very disturbing behavior in compiler

jtaylor
Please see my attached file, and try compiling it on your machine.
Yes, there should be an error in the second call to 'Duplicate'.
However, no error is generated. I have observed this on two different computers.
Does anyone else see this error?
Thanks,
Jeff
Use <igor> and </igor> tags around the text to show Igor code in-line:
It is true that the compiler accepts only one arg to Duplicate when two are needed.
Running the code does give a run-time error "expected wave name" on that line.
The compiler author could explain why, but I suspect it is because of the complexities of using $stringExpression.
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
September 24, 2015 at 04:27 pm - Permalink
September 24, 2015 at 04:31 pm - Permalink
Duplicate wave0
would also not give an error until runtime.
Duplicate was not checking for zero destinations. Now it does. The next (tomorrow's) nightly build will have this change. You can get the nightly build here:
http://www.wavemetrics.net/Downloads/latest/
Larry Hutchinson
WaveMetrics
support@WaveMetrics.com
September 25, 2015 at 08:29 am - Permalink
September 28, 2015 at 12:27 pm - Permalink