Address of a variable: Difference between revisions
m
→{{header|Zig}}: update @ptrToInt() to @intFromPtr() for Zig 0.11.0
imported>Acediast (→{{header|COBOL}}: syntax highlighting doesn't support freeform 🗿) |
Recombinant (talk | contribs) m (→{{header|Zig}}: update @ptrToInt() to @intFromPtr() for Zig 0.11.0) |
||
Line 2,421:
=={{header|Zig}}==
{{works with|Zig|0.11.0}}
<syntaxhighlight lang="zig">const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
Line 2,428 ⟶ 2,429:
var address_of_i: *i32 = &i;
try stdout.print("{x}\n", .{@
}</syntaxhighlight>
|