diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-21 13:00:53 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-21 13:00:53 -0500 |
| commit | f868d02b08688c04509d1abda5af89a182033d88 (patch) | |
| tree | af64c48127e0edfebb348edabbccbcc402d2070b /examples/learnxiny.tm | |
| parent | 90573ba7a15bb47a11c1eb6f69ed04c01b69724d (diff) | |
Add `NULL` as a syntax for null values.
Diffstat (limited to 'examples/learnxiny.tm')
| -rw-r--r-- | examples/learnxiny.tm | 4 |
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 |
