bool, void, and the Comptime Types
The small but essential primitives.
Small but Essential Types
Beyond numbers, Zig has a handful of tiny primitives that show up everywhere: bool, void, and special compile-time number types. 🧩
bool Holds True or False
A bool stores exactly one of two values: true or false. It drives every if statement and while condition you write.
const ready: bool = true;All lessons in this course
- Sized Integers: i32, u8, usize
- Floating Point: f32 and f64
- bool, void, and the Comptime Types
- Number Literals and Underscores