Another weird ternary Evaluator result

In the Evaluator editor the example file has atttr equal to 10272, but I get different results for a & b in the ternary comparison depending on whether I use attr or actual value 10272!!!

myAttr2  = ""; b = 2; c = 2048;
a = attr;    // outputs a&b>0 in l3 below, l2 a&b=0
//a = 10272; // outputs a&b≤0 in l3 below, l2 a&b=0
myAttr2  += a + "&" + b + "=" + (a & b) + ",  ";
myAttr2  += a + "&" + c + "=" + (a & c) + ",  "; // l2
myAttr2  += (a & b ? "a&b>0" : "a&b≤0") + ",  "; // l3
myAttr2  += (a & c ? "a&c>0" : "a&c≤0") + ",  ";

return myAttr2 as str

Even more interesting, multiplication is not associative! In the same code above these two give different output

a = (attr*0) + 10272; // > in l3
//a = (0*attr) + 10272; // ≤ in l3

Can you confirm if this is still an issue in the release version?

It is still an issue

1 Like

Thanks, this should be fixed in the next update.