Unary Operators

Logical Operators

NOT (!, not)

% C-style
result: int = !x

% Python style
result: int = not x

Bitwise Operators

Bitwise NOT (~)

% 1010 becomes 0101
result: int = ~x

Memory Operations

Dereference (.*)

ptr: *int = value.&

% Get value at ptr
result: int = ptr.*

Address-of (&)

Increment/Decrement

Pre-increment (++x)

Pre-decrement (--x)

Post-increment (x++)

Post-decrement (x--)

Example Differences

Pre vs Post Increment

Last updated