Primitive type: boolean

Primitive type: boolean

A boolean is either true or false.

In a script, numbers are implicitly converted to booleans, a non-zero number is true, 0 is false.

When converted to a number, true becomes 1 and false becomes 0.

The strings "yes" and "no" can also be converted to booleans.

File syntax

 boolean: true
 boolean: false

Script syntax

 true or false

The operators or, and and xor combine two booleans:

a b a or b a and b a xor b
false false false false false
false true true false true
true false true false true
true true true true false

See also

to_boolean Convert a value to a boolean