0PricingLogin
Zig Academy · Lesson

Printing with std.debug.print

Get text on screen and format values.

Your Window into the Program

Printing text is how you see what your code is doing. Zig's quickest way to do that is std.debug.print. 🖨️

Reaching Into std

The dots in std.debug.print are a path: the std module contains debug, which contains the print function you are calling.

const std = @import("std");
std.debug.print("Hello\n", .{});

All lessons in this course

  1. Install Zig on Any Platform
  2. Your First main Function
  3. Printing with std.debug.print
  4. Compile and Run in One Step
← Back to Zig Academy