0PricingLogin
Zig Academy · Lesson

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

  1. Sized Integers: i32, u8, usize
  2. Floating Point: f32 and f64
  3. bool, void, and the Comptime Types
  4. Number Literals and Underscores
← Back to Zig Academy