mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 13:06:30 +00:00
30 lines
302 B
Plaintext
30 lines
302 B
Plaintext
|
|
|
|
fn add(a: int, b: int) -> int {
|
|
a + b
|
|
}
|
|
|
|
add(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 += 1;
|
|
} |