007_strings2.zig 542 B

12345678910111213141516171819202122232425
  1. //
  2. // Here's a fun one: Zig has multi-line strings!
  3. //
  4. // To make a multi-line string, put '\\' at the beginning of each
  5. // line just like a code comment but with backslashes instead:
  6. //
  7. // const two_lines =
  8. // \\Line One
  9. // \\Line Two
  10. // ;
  11. //
  12. // See if you can make this program print some song lyrics.
  13. //
  14. const std = @import("std");
  15. pub fn main() void{
  16. const lyrics =
  17. \\Ziggy played guitar
  18. \\Jamming good with Andrew Kelley
  19. \\And the Spiders from Mars
  20. ;
  21. std.debug.print("{s}\n", .{lyrics});
  22. }