zig/doc/langref/runtime_shrExact_overflow.zig

11 lines
195 B
Zig

const std = @import("std");
pub fn main() void {
var x: u8 = 0b10101010; // runtime-known
_ = &x;
const y = @shrExact(x, 2);
std.debug.print("value: {}\n", .{y});
}
// exe=fail