From 4f3af2d3b0e7967155324746993b2c283d212147 Mon Sep 17 00:00:00 2001 From: kdx Date: Sat, 10 Jun 2023 18:30:43 +0200 Subject: complexify hello world because i can --- samples/helloworld.golem | 10 ++++++---- 1 file 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'; -- cgit v1.2.3