macro vs function

I recently found a bug in some legacy code that amounts to the following:

macro junk()
    variable a=1, b=1, c=3, d=4
    if (a!=b) || (c!=d) // should be ((a!=b) || (c!=d))
        print "not equal"
        print "both equal"

I realize that macros aren't compiled but are interpreted line by line. But I thought Igor would throw an error as it tried to execute the if statement because of the trailing text after the first ). But it doesn't, and prints "both equal". Changing the macro to a function does produce an error at compile time.

This is true for Igor 7&8.

One of the reasons to use user-defined functions. The error checking is much better and happens at compile time, not at run time. In general, enhancements to the Igor language go only into functions.