Note: information on this page refers to Ceylon 1.2, not to the current release.
!
(not) operator
The right-associative, unary ||
operator is used to compute the
logical not of its operand.
Usage
Boolean true_ = !false;
Description
Definition
The !
operator is defined as:
if (rhs) false else true
See the language specification for more details.
Polymorphism
The !
operator is not polymorphic.
Type
The result type of the !
operator is Boolean
.
Notes
- The
!
operator has a much lower precedence than other C-like languages!
See also
- logical operators in the language specification
- operator precedence in the language specification