zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

print_comptime-known_format.zig (241B) - Raw


      1 const print = @import("std").debug.print;
      2 
      3 const a_number: i32 = 1234;
      4 const a_string = "foobar";
      5 const fmt = "here is a string: '{s}' here is a number: {}\n";
      6 
      7 pub fn main() void {
      8     print(fmt, .{ a_string, a_number });
      9 }
     10 
     11 // exe=succeed