True

From OpenEUO
Jump to: navigation, search

Description

true is a lua keyword and valid value of type 'boolean'. While false is the opposite of true, nil is also considered false unless explicitly tested for. All boolean operators return either true or false.

local a,b,c = true,false,nil
print(a == b)
print(a ~= b)
print(a ~= c)
print(b ~= c)
print(c ~= nil)
print(a and not c)
--> 'false'
--> 'true'
--> 'true'
--> 'true'
--> 'false'
--> 'true'

See Also