slige/examples/example_1.slg

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) {
}
}