释义 |
local p = {} function p.doOp(frame) local n local op1 = frame.args[1] local op = frame.args[2] local op2 = frame.args[3] if op == "+" then n = op1 + op2 elseif op == "-" then n = op1 - op2 elseif op == "*" then n = op1 * op2 elseif op == "/" then n = op1 / op2 elseif op == "^" then for i = 1, op2, 1 do n = n * op1 end end return n end return p |