Boolean (class)

From Moondust Wiki
Revision as of 12:59, 7 April 2017 by Fun2 (talk | contribs) (Moved the tutorial link to a separate section.)
Jump to navigation Jump to search

The boolean data type has two values (usually denoted true (1) and false (0)). Variables can be set as boolean in Lua using the false and true parameters. When testing for boolean values in conditions, if var == true then or if var == false then is not needed, but rather only if var then when testing for true and if not var then when testing for false.

External links

Learn more here: http://lua-users.org/wiki/LuaTypesTutorial