Toggle
-
not
-
! is the not-operator
fn main() { let mut t = true; println!("{t}"); t = !t; println!("{t}"); t = !t; println!("{t}"); }
true
false
true
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
not
! is the not-operator
fn main() { let mut t = true; println!("{t}"); t = !t; println!("{t}"); t = !t; println!("{t}"); }
true
false
true