summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-06-10 18:30:43 +0200
committerkdx <kikoodx@paranoici.org>2023-06-10 18:30:43 +0200
commit4f3af2d3b0e7967155324746993b2c283d212147 (patch)
treeefb7e4b08d4032c9fdbdadc146bdd7563d9af9a6
parent905365181c7d61c5d79d065a8843e3d5358e0680 (diff)
downloadgolem-4f3af2d3b0e7967155324746993b2c283d212147.tar.gz
complexify hello world because i can
-rw-r--r--samples/helloworld.golem10
1 files changed, 6 insertions, 4 deletions
diff --git a/samples/helloworld.golem b/samples/helloworld.golem
index 6609a51..5dbc6b5 100644
--- a/samples/helloworld.golem
+++ b/samples/helloworld.golem
@@ -16,7 +16,6 @@ main() {
strappend('l');
strappend('d');
strappend('!');
- strappend('\n');
i = 0;
loop {
@@ -24,6 +23,7 @@ main() {
if (i > 9)
break;
print(str);
+ nl();
}
}
@@ -32,11 +32,13 @@ strappend(c) {
str_i = str_i + 1;
}
-print(s) {
+print(s)
loop {
if ([s] == 0)
- break;
+ return 0;
wrt [s];
s = s + 1;
}
-}
+
+nl()
+ wrt '\n';