var b: bool = true;
const n: bool = false;
b |= n;
Strange…
Why can’t we do operations on booleans?
How are we supposed to handle this?
var b: bool = true;
const n: bool = false;
b |= n;
Strange…
Why can’t we do operations on booleans?
How are we supposed to handle this?
b = b or n;
The and and or operators can modify the control flow, so they’re defined as a keyword. The | and & operators are bitwise operations.
ok. yes. thanks. picked up Zig after a few months again. confusion solved ![]()