Error message "paramete not declared" in a procedure that won't complie, poblem with the "sort"-function?

Hi,

I'm quite new at programming in Igor but was lucky enough to stumble across a process written by an Igor programmer that does exactly what I want to do.

https://www.wavemetrics.com/code-snippet/wave-arithmetic-mismatched-xy-…

However, the code won't compile. I get the error message "Parameter not declared" although the parameter is declared and Sort is an operation (which my Igor clearly recognizes since it is turned green). I've tried the code in a new, blank Igor file with just some simple example data but it wont compile and can't be called from the command window. In the image attached yo can see the error, the code is copied from the page linked above.

I'm using Igor 6.7.3.2 but it looks like the syntax for the "sort"-function hasn't changed since the code was written, can there still be an issue with the Igor-version?

Thankful for any help!

 

Image of the code and error in compiling

Hello,

I don't have Igor 6 to check but I think declaring the arguments came in Igor 8 or so.

where it says:

`Function UnmatchedXYPairArithmetic(WAVE axwave, WAVE aywave, WAVE bxwave, WAVE bywave, Variable operation, String outwavename)`

it should say

Function UnmatchedXYPairArithmetic(axwave, aywave, bxwave, bywave, operation, outwavename)

WAVE axwave, aywave, bxwave, bywave
Variable operation
String outwavename`

There's also a typo in Constant on the third line.

Also note that the last function parameter is a string, i.e. your function call would beed to be:

UnmatchedXYPairArithmetic(wave0, wave1, wave2, wave3, 0, "wave4")

 

Thank you, that did fix the problem. I didn't realize that I have such an ancient version of igor but now I can complete the analysis I want to do!

Hehe, while I understand the fondness for Igor 6 (some of my students still use it), the last update for this version was released back in 2015. ;)

Igor 6.37 (the last update for Igor 6) was released June 15, 2015. That's like 60 years in software years :)