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/arrays.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/arrays.md')
| -rw-r--r-- | api/arrays.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/api/arrays.md b/api/arrays.md index 34da6e8f..0dede5dd 100644 --- a/api/arrays.md +++ b/api/arrays.md @@ -42,6 +42,15 @@ Comprehensions can be combined with regular items or other comprehensions: = [-1, 30, 40, 50, 60, 70, 80, 1, 2, 3] ``` +## Length + +Array length can be accessed by the `.length` field: + +```tomo +>> [10, 20, 30].length += 3 +``` + ## Indexing Array values are accessed using square bracket indexing. Since arrays are |
