so... jai :D
This commit is contained in:
19
examples/21-categories.sx
Normal file
19
examples/21-categories.sx
Normal file
@@ -0,0 +1,19 @@
|
||||
#import "modules/std.sx";
|
||||
|
||||
Point :: struct {
|
||||
x, y: s32;
|
||||
}
|
||||
|
||||
Color :: struct {
|
||||
r, g, b: s32;
|
||||
}
|
||||
|
||||
main :: () {
|
||||
p := Point.{10, 20};
|
||||
c := Color.{255, 128, 0};
|
||||
print("p: {}\n", p);
|
||||
print("c: {}\n", c);
|
||||
print("n: {}\n", 42);
|
||||
print("s: {}\n", "hello");
|
||||
print("b: {}\n", true);
|
||||
}
|
||||
Reference in New Issue
Block a user