aboutsummaryrefslogtreecommitdiff
path: root/examples/learnxiny.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-06 19:20:07 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-06 19:20:07 -0400
commit1d2e55f53dfab5153dbfd0c03f28cd9daedb3b77 (patch)
treeaa1c21191800467abe0b3d16cb6c2a0c2e4587f9 /examples/learnxiny.tm
parentbc93dea8186168aa015b05a615bc1873173393b5 (diff)
Allow uninitialized variables when there's a sensible empty value
(defaults to empty/zero value)
Diffstat (limited to 'examples/learnxiny.tm')
-rw-r--r--examples/learnxiny.tm4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/learnxiny.tm b/examples/learnxiny.tm
index 5bf8e69f..31d768eb 100644
--- a/examples/learnxiny.tm
+++ b/examples/learnxiny.tm
@@ -56,7 +56,7 @@ func main()
my_numbers := [10, 20, 30]
# Empty arrays require specifying the type:
- empty_array : [Int] = []
+ empty_array : [Int]
>> empty_array.length
= 0
@@ -120,7 +120,7 @@ func main()
= 0
# Empty tables require specifying the key and value types:
- empty_table : {Text=Int} = {}
+ empty_table : {Text=Int}
# Tables can be iterated over either by key or key,value:
for key in table