Skip to content
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

correct to 0.11.0 builtin function names #345

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions exercises/036_enums2.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
// const Stuff = enum(u8){ foo = 16 };
//
// You can get the integer out with a builtin function,
// @intFromEnum(). We'll learn about builtins properly in a later
// @enumToInt(). We'll learn about builtins properly in a later
// exercise.
//
// const my_stuff: u8 = @intFromEnum(Stuff.foo);
// const my_stuff: u8 = @enumToInt(Stuff.foo);
//
// Note how that built-in function starts with "@" just like the
// @import() function we've been using.
Expand Down Expand Up @@ -57,8 +57,8 @@ pub fn main() void {
\\</p>
\\
, .{
@intFromEnum(Color.red),
@intFromEnum(Color.green),
@intFromEnum(???), // Oops! We're missing something!
@enumToInt(Color.red),
@enumToInt(Color.green),
@enumToInt(???), // Oops! We're missing something!
});
}
Loading