local n = tonumber(x); if n then -- n就是得到数字 else -- 转数字失败,不是数字, 这时n == nil end. 二、Lua判断数字. 判断显式.
確定! 回上一頁