-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
posts/learning-zig-day-2/ #45
Comments
If you try; const std = @import("std");
pub fn main() void {
const implicitly_sized_array = [_]u8{0, 1, 2, 3};
std.debug.print("This is an array: {}\n", .{implicitly_sized_array});
} on master branch, you get a helpful compiler error: error: cannot format array without a specifier (i.e. {s} or {any})
@compileError("cannot format array without a specifier (i.e. {s} or {any})");
^ so when we change our code to; std.debug.print("This is an array: {any}\n", .{implicitly_sized_array}); we get; This is an array: { 0, 1, 2, 3 } |
I suppose that's what I get for trying to use the stable branch. Will make the switch to nightly, thanks for the tip! |
Include front matter in home and list pages if provided
Include front matter in home and list pages if provided
Learning Zig - Day 2 - Harsh Shandilya
Onwards in our quest to learn Zig
https://msfjarvis.dev/posts/learning-zig-day-2/
The text was updated successfully, but these errors were encountered: