#import "modules/std.sx"; #import "modules/math/math.sx"; #import "modules/compiler.sx"; #import "modules/test.sx"; pkg :: #import "modules/testpkg"; Point :: struct { x, y: s32; } main :: () { // ======================================================== // 18. ARRAYS OF USER-DEFINED TYPES // ======================================================== print("=== 18. Array of Structs ===\n"); { spts : [2]Point = .[Point.{1, 2}, Point.{3, 4}]; spt2 := spts[1]; print("arr-struct-x: {}\n", spt2.x); for spts: (it) { print("for-struct: {}\n", it); } } }