Skip to content

Booleans

iaminfinityiq edited this page Feb 20, 2026 · 1 revision

boolean data type

This data type has 2 possible values: true and false. When performed in arithmetic operators and comparison operators, true acts as 1, and false acts as 0. Comparison operations on built-in data types like ==, !=,... returns this data type

Operations performed on boolean

  1. +: Addition. This can be performed on int, double, and boolean. This can also be interpreted as unary plus if used as +<value>
  2. -: Subtraction. This can be performed on int, double, and boolean. This can also be interpreted as unary minus (negation) if used as -<value>
  3. *: Multiplication. This can be performed on int, double, and boolean
  4. /: Division. This can be performed on int, double, and boolean
  5. %: Modulo (get the remainder of a division). This can be performed on int, double, and boolean. This can also be interpreted as percentage if used as <value>%
  6. ==: Acts as equality comparison
  7. !=: Reverse of ==
  8. >: Greater than. This can be performed on int, double, and boolean
  9. <: Smaller than. This can be performed on int, double, and boolean
  10. >=: Greater than or equals. This can be performed on int, double, and boolean
  11. <=: Smaller than or equals. This can be performed on int, double, and boolean
  12. &&: And operation, returns true if both of the inputs are true, else returns false. This operation uses a short-circuit technique that returns false immediately without checking the right side if the left side is false. This can be performed on boolean
  13. ||: Or operation, returns true if at least one of the inputs are true, else returns false. This operation uses a short-circuit technique that returns true immediately without checking the right side if the left side is true. This can be performed on boolean
  14. !: Not operation, denoted as !a, returns the opposite of a

For Tix's built-in modules, please refer here.

Clone this wiki locally