blob: 98c4b01a17fbd30a26c6b021deb234352d98197b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
puti @= fn(x: int) {
#C("printf(\"%ld\\n\", (long)x);
");
};
foo @= fn() int {
x:= new(int, 10).len;
x
};
bar @= fn() int {
x := new(int,10);
(&x).len
};
baz @= fn() int {
x: [10]int;
x.len
};
quux @= fn() int {
x: [10]int;
(&x).len
};
main @= fn() {
puti(foo());
X @= foo();
puti(X);
puti(bar());
Y @= bar();
puti(Y);
puti(baz());
Z @= baz();
puti(Z);
puti(quux());
W @= quux();
puti(W);
};
|