diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-18 20:28:16 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-18 20:28:39 -0400 |
| commit | d804b09b02b9c4a6ea6b16ae85524a704796cbc1 (patch) | |
| tree | 3379d64b028a80825a892c87176b6bb6d6cc3484 /api/tables.md | |
| parent | c338c3f08c6a13242e975dd344bad63a3cec9eee (diff) | |
Added a .length field to arrays/sets/tables, added a .max_size field to
channels, and updated the API
Diffstat (limited to 'api/tables.md')
| -rw-r--r-- | api/tables.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/api/tables.md b/api/tables.md index f132d70a..f4753efb 100644 --- a/api/tables.md +++ b/api/tables.md @@ -50,6 +50,18 @@ t2 := {"B": 20; fallback=t} = 10 ``` +The fallback is available by the `.fallback` field, which returns an optional +readonly pointer to the fallback table (if present) or null if it is not. + +## Length + +Table length can be accessed by the `.length` field: + +```tomo +>> {"A":10, "B":20}.length += 2 +``` + ## Accessing Keys and Values The keys and values of a table can be efficiently accessed as arrays using a |
