aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-21 13:00:53 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-21 13:00:53 -0500
commitf868d02b08688c04509d1abda5af89a182033d88 (patch)
treeaf64c48127e0edfebb348edabbccbcc402d2070b /examples
parent90573ba7a15bb47a11c1eb6f69ed04c01b69724d (diff)
Add `NULL` as a syntax for null values.
Diffstat (limited to 'examples')
-rw-r--r--examples/learnxiny.tm4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/learnxiny.tm b/examples/learnxiny.tm
index ed8e2596..99649129 100644
--- a/examples/learnxiny.tm
+++ b/examples/learnxiny.tm
@@ -106,13 +106,13 @@ func main():
# Tables are efficient hash maps
table := {"one": 1, "two": 2}
>> table:get("two")
- = 2?
+ = 2 : Int?
# The value returned is optional (because the key might not be in the table).
# Optional values can be converted to regular values using `!` (which will
# create a runtime error if the value is null) or the `or` operator:
>> table:get("two")!
- = 2
+ = 2 : Int
>> table:get("xxx") or 0
= 0