blob: 3af537b858115443d3de76ddb35eef71d56a75b5 (
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
|
const io = @import("io.amal");
const User = struct {
name: str;
age: i32;
}
const main = fn {
var hello = fn {
}
const value = "hello";
// fn {} // error, function declaration can't be by itself. Needs left-hand side
print(value, "world", 356, 13.37);
var num1: i32;
const num2 = 23232;
const num3 = num1 + num2 * 30;
const num4 = (num1 + num2) * num3 * ((34 + 32) / 234.345);
// pub cost num34 = 45; // error, only declarations in global scope can be public
//const num4 = 23; // error, variable redeclaration
/*
episfjpseifipesf
*/
io.puts("lole");
}
const print = fn {
}
|