Number (class)

From Moondust Wiki
Revision as of 03:49, 3 November 2016 by Pixelpest (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Number is the universal number data type in Lua. It can contain every type of number. If you want to use it a function be sure to provide the correct hardcoded data type!


local a = 5
local b = 0.5
printText(tostring(a).." + "..tostring(b).." = "..tostring(a+b), 30, 100) --calculates a+b and prints out the result.