1#update=initial version
2#file=main.zig
3pub fn main() !void {
4 try foo(0x1300);
5}
6fn foo(x: u16) !void {
7 var stdout_writer = std.Io.File.stdout().writerStreaming(io, &.{});
8 try stdout_writer.interface.print("0x{x}\n", .{x << 4});
9}
10const std = @import("std");
11const io = std.Io.Threaded.global_single_threaded.io();
12#expect_stdout="0x3000\n"
13#update=change to right shift
14#file=main.zig
15pub fn main() !void {
16 try foo(0x1300);
17}
18fn foo(x: u16) !void {
19 var stdout_writer = std.Io.File.stdout().writerStreaming(io, &.{});
20 try stdout_writer.interface.print("0x{x}\n", .{x >> 4});
21}
22const std = @import("std");
23const io = std.Io.Threaded.global_single_threaded.io();
24#expect_stdout="0x130\n"