aboutsummaryrefslogtreecommitdiff
path: root/code
diff options
context:
space:
mode:
Diffstat (limited to 'code')
-rw-r--r--code/demo.odin16
1 files changed, 7 insertions, 9 deletions
diff --git a/code/demo.odin b/code/demo.odin
index c517169b0..9f9658e08 100644
--- a/code/demo.odin
+++ b/code/demo.odin
@@ -4,16 +4,14 @@
#import "mem.odin"
-A :: struct { using e: [12]int }
-Vector2 :: raw_union {
- using _xy: struct #ordered { x, y: f32 }
- using v: {2}f32
- e: [2]f32
-}
main :: proc() {
- v: Vector2
- v.x = 123
- v[1] = 321
+ Vec3 :: struct {
+ x, y: i16
+ z: int
+ }
+
+ z := 123
+ v := Vec3{x = 4, y = 5, z = z}
fmt.println(v)
}