aboutsummaryrefslogtreecommitdiff
path: root/doc/langref/print_comptime-known_format.zig
blob: 45a4e1e05c44645b1b602c6a8dcbd30e181117a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
const print = @import("std").debug.print;

const a_number: i32 = 1234;
const a_string = "foobar";
const fmt = "here is a string: '{s}' here is a number: {}\n";

pub fn main() void {
    print(fmt, .{ a_string, a_number });
}

// exe=succeed