aboutsummaryrefslogtreecommitdiff
path: root/examples/tutorial.nom
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tutorial.nom')
-rw-r--r--examples/tutorial.nom20
1 files changed, 9 insertions, 11 deletions
diff --git a/examples/tutorial.nom b/examples/tutorial.nom
index 7e9a14b..3608be2 100644
--- a/examples/tutorial.nom
+++ b/examples/tutorial.nom
@@ -54,24 +54,22 @@ if (1 > 10):
# For longer conditionals, a "when" branch is the best option
when:
- ? 1 > 4:
+ * (1 > 4)
+ * (1 > 3):
say "this won't print"
- ? 1 > 3:
+ * (1 > 2):
say "this won't print"
- ? 1 > 2:
- say "this won't print"
- ?:
+ * else:
say "this will print"
# When "when" is given an argument, it works like a switch statement
-when 3:
- == 1:
- say "this won't print"
- == 2:
+when 3 == ?:
+ * 1
+ * 2:
say "this won't print"
- == 3:
+ * 3:
say "this will print"
- ==:
+ * else:
say "this won't print"
# Loops look like this: