mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 19:36:32 +00:00
35 lines
420 B
Plaintext
35 lines
420 B
Plaintext
|
|
fn println(str: string) {
|
|
}
|
|
|
|
fn sum(a: int, b: int) -> int {
|
|
+ a b
|
|
}
|
|
|
|
fn main() {
|
|
sum(2,3); // -> 5
|
|
|
|
let a: string = "Hello";
|
|
|
|
let b = "world";
|
|
|
|
println(+ + + a " " b "!"); // -> "Hello world!"
|
|
|
|
if == a b {
|
|
println("whaaaat");
|
|
}
|
|
else {
|
|
println(":o");
|
|
}
|
|
|
|
loop {
|
|
let i = 0;
|
|
|
|
if >= i 10 {
|
|
break;
|
|
}
|
|
|
|
i = + i 1;
|
|
}
|
|
}
|