zig/test/cases/structs.1.zig

11 lines
154 B
Zig
Raw Normal View History

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