local names = setmetatable({},
{__mul = function(a,b) return a|b end}
)
names={i=0,j=1}
tr=load("return i*j",nil,"t",names)()
print(tr)
It prints tr
as 0
. The expected answer is 1
as 0|1
results to 1
. Where is the code wrong?
local names = setmetatable({},
{__mul = function(a,b) return a|b end}
)
names={i=0,j=1}
tr=load("return i*j",nil,"t",names)()
print(tr)
It prints tr
as 0
. The expected answer is 1
as 0|1
results to 1
. Where is the code wrong?
Try: