added a snake game example and fixed a small bug in the compiler

This commit is contained in:
IgorCielniak
2026-03-14 12:44:34 +01:00
parent 2193e0bf3c
commit fd030be086
4 changed files with 687 additions and 13 deletions

View File

@@ -0,0 +1,4 @@
neg
zero
small
big

View File

@@ -0,0 +1,23 @@
import stdlib/stdlib.sl
word classify
with n in
n 0 < if
"neg" puts
else n 0 == if
"zero" puts
else n 10 < if
"small" puts
else
"big" puts
end
end
end
word main
-1 classify
0 classify
3 classify
20 classify
0
end