undar-lang/test/if.ul

24 lines
355 B
Plaintext
Executable File

main();
halt;
function main() {
nat x = 20;
if (x == 10) {
print("x is 10");
} else if (x == 20) {
print("x is 20");
} else {
print("x is something else");
}
}
function print(str string) {
nat i = 0;
while (i < string.length) {
write = string[i];
i = i + 1;
}
write = '\n';
}