zig/test/cases/structs.2.zig

11 lines
180 B
Zig
Raw Normal View History

2022-04-27 21:59:55 +01:00
const Example = struct { x: u8, y: u8 };
pub fn main() u8 {
var example: Example = .{ .x = 5, .y = 10 };
_ = &example;
2022-04-27 21:59:55 +01:00
return example.y + example.x - 15;
}
// run
//