blob: a908c0e531ecf4e5c9386b1bf815c70bf3751833 (
plain) (
blame)
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
|
def puts = $foreign("puts", func(s ^u8));
/*
def foo = func() {
let my_string =
\ This is my line
\ this is a second line
\ etc.
;
puts(my_string);
}
*/
/* def add = func(dst *vec($N), v, u vec($N))
* $poke(operator.addeq)
* {
* loop (i: 0...N)
* dst[i] = v[i] + u[i];
* }; */
def main′ = func() {
puts("Hello, sailor!");
some_func(#b10.1100'1001e+11);
x, y = 69, 420;
slices_sort(my_slice, func(x, y int) int {
return x - y;
});
};
def r, g, b u8 = 1, 2, 3;
def some_func = func(n u32) u32 { return n * 2; };
/* def MY_FLOAT = union { f f64; n u64; } { n = 0x482DEF }.f */
def main = func() { main′(); };
|