saker.build Documentation TaskDoc JavaDoc Packages
  1. saker.build
  2. ›
  3. Scripting language
  4. ›
  5. Language reference
  6. ›
  7. Operators
  8. ›
  9. Boolean negate

Boolean negate

The boolean negate unary operator negates the boolean value of its subject. The subject expression is evaluated, and its value is interpreted as a boolean according to the same ruls as the if-else statement.

# negate a simple literal: false
!true
# negate a variable: true if $condition is false boolean
!$condition
# negate complex expressions
!($cond1 || $cond2)