Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Unary Operaters

Unary operators can create expressions that take one other expression as input. An example of a binary operator is the not ! operator:

main || {
    out(!true); // prints false
}

All the currently existing unary operators and the types they evaluate to:

OperatorOperand Type= Evaluated Type
! (not)boolbool