undar-lang/test/add.ul

18 lines
252 B
Plaintext
Executable File

print(add(1, 1) as str);
halt;
/**
* Add two numbers together
*/
function add(nat a, nat b) nat {
return a + b;
}
function print(str string) {
nat i = 0;
while (i < string.length) {
write = string[i];
i = i + 1;
}
}