Macros are vulnerable to operator grouping when passing an expressions
For instance
macro right(s,i)
mid(s,-i)
end macro
t="qwerty"
a=1
print "!"+right(t,2+a )+"?" 'result: !y?
print "!"+right(t,(2+a) )+"?" 'result: !rty?
solution: put brackets around i inside the macro
macro right(s,i)
mid(s,-(i))
end macro
t="qwerty"
a=1
print "!"+right(t,2+a )+"?" 'result: !rty?