SplitScript reference / Integer / bitNot
Integer.bitNot
Operator
T.bitNot() -> T where T: Integer
Returns the width-preserving bitwise complement of this integer.
This method is also the integer implementation of the ! operator. Every bit in the receiver's declared integer representation is flipped; for example, complementing a u8 never affects bits outside that byte. Boolean ! remains logical negation and is selected by type.
Effects: pure
Runtime behavior: available everywhere; synchronous
Examples
Invert an eight-bit mask
let inverse: u8 = !0x0fu8