Boolean (type)

From ComputerCraft Wiki
Revision as of 14:43, 18 July 2013 by Cranium (Talk | contribs) (corrected link)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

A Boolean value (or more commonly, "boolean") represents either a "true" or "false" value. A boolean value is not capable of holding any other data, such as (integers, floating-point numbers and strings) and is usually used by functions to state whether the function was successful.

Boolean values can be used in logic statements (as conditionals), and can also be expressed as binary, where true is a value of 1 and false is a value of 0.

For a more in-depth and concise explanation of types, please consult the Lua 5.1 Official Manual.