From f868d02b08688c04509d1abda5af89a182033d88 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 21 Nov 2024 13:00:53 -0500 Subject: Add `NULL` as a syntax for null values. --- examples/learnxiny.tm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') 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 -- cgit v1.2.3