local function check_and_return_balance(balance:string,decimals:int)
local temp_balance:number = tonumber(balance)
if temp_balance == nil or temp_balance <= 0 then
return 0
end
local add_num = (temp_balance + 1/(decimals1000)) decimals
return tointeger(add_num)
end
合约检测余额的这个语句,完全看不懂,有什么意义?
local function check_and_return_balance(balance:string,decimals:int) local temp_balance:number = tonumber(balance) if temp_balance == nil or temp_balance <= 0 then return 0 end local add_num = (temp_balance + 1/(decimals1000)) decimals return tointeger(add_num) end 合约检测余额的这个语句,完全看不懂,有什么意义?