數字(number)是Lua的基礎型別之一。Lua會自動判斷是整數還是小數,會自動轉換,無明確分界。 1.0 == 1 ... math.type(1.0) -- => float math.type(1) -- => integer ...
確定! 回上一頁