saker.build Documentation TaskDoc JavaDoc Packages
  1. saker.build
  2. Scripting language
  3. Language reference
  4. Operators
  5. 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)