Skip to content

Commit b3a254f

Browse files
committed
Update outdated comments
1 parent 9736255 commit b3a254f

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

exercises/036_enums2.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
// const Stuff = enum(u8){ foo = 16 };
77
//
88
// You can get the integer out with a builtin function,
9-
// @enumToInt(). We'll learn about builtins properly in a later
9+
// @intFromEnum(). We'll learn about builtins properly in a later
1010
// exercise.
1111
//
12-
// const my_stuff: u8 = @enumToInt(Stuff.foo);
12+
// const my_stuff: u8 = @intFromEnum(Stuff.foo);
1313
//
1414
// Note how that built-in function starts with "@" just like the
1515
// @import() function we've been using.

exercises/064_builtins.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Ziglings exercise.
55
//
66
// We've also seen @intCast() in "016_for2.zig", "058_quiz7.zig";
7-
// and @enumToInt() in "036_enums2.zig".
7+
// and @intFromEnum() in "036_enums2.zig".
88
//
99
// Builtins are special because they are intrinsic to the Zig
1010
// language itself (as opposed to being provided in the standard

exercises/065_builtins2.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//
22
// Zig has builtins for mathematical operations such as...
33
//
4-
// @sqrt @sin @cos
5-
// @exp @log @floor
4+
// @sqrt @sin @cos
5+
// @exp @log @floor
66
//
77
// ...and lots of type casting operations such as...
88
//
9-
// @as @intToError @intToFloat
10-
// @intToPtr @ptrToInt @enumToInt
9+
// @as @errorFromInt @floatFromInt
10+
// @ptrFromInt @intFromPtr @intFromEnum
1111
//
1212
// Spending part of a rainy day skimming through the complete
1313
// list of builtins in the official Zig documentation wouldn't be

0 commit comments

Comments
 (0)