Init new repository

This commit is contained in:
Krzosa Karol
2024-04-13 15:29:53 +02:00
commit 5a2e3dcec4
335 changed files with 61571 additions and 0 deletions

25
tests/arrays.txt Normal file
View File

@@ -0,0 +1,25 @@
import "libc";
p :: proc(a: [100]int @unused) {
}
vv: [10]int = {[5] = 4};
str := :[]*char{"A", "B", "CD"};
#static_assert(1 == 1);
main :: proc(): int {
v: [100]int = {1,2};
#static_assert(typeof(v) == typeof(:[100]int));
assert(v[0] == 1);
assert(v[1] == 2);
assert(vv[5] == 4);
assert(vv[6] == 0);
p(v); // disallow?
assert(str[0][0] == 'A');
p0: *int = &v[0];
p1 := &v[0];
#static_assert(typeof(p0) == typeof(p1));
return 0;
}