mirror of
https://git.sfja.dk/Mikkel/slige.git
synced 2025-01-18 22:46:30 +00:00
26 lines
375 B
Plaintext
26 lines
375 B
Plaintext
fn print(msg: string) #[builtin(Print)] {}
|
|
|
|
fn sum(a: int, b: int) -> int {
|
|
a + b
|
|
}
|
|
|
|
fn main() {
|
|
sum(2,3); // -> 5
|
|
|
|
let a: string = "Hello";
|
|
|
|
let b = "world";
|
|
|
|
print(a + " " + b + "!\n"); // -> "Hello world!"
|
|
|
|
if a == b {
|
|
print("Equal\n");
|
|
}
|
|
else {
|
|
print("Unequal\n");
|
|
}
|
|
|
|
for (let i = 0; i < 10; i += 1) {
|
|
}
|
|
}
|