mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
14 lines
257 B
Zig
14 lines
257 B
Zig
const Example = struct { x: u8, y: u8 };
|
|
|
|
pub fn main() u8 {
|
|
var example: Example = .{ .x = 5, .y = 10 };
|
|
var example2: Example = .{ .x = 10, .y = 20 };
|
|
_ = &example2;
|
|
|
|
example = example2;
|
|
return example.y + example.x - 30;
|
|
}
|
|
|
|
// run
|
|
//
|