table

A key/value container.
A new table can be created with brackets syntax:

local table1 = {} // empty table
local table2 = { a = 1, b = "hello", c = 5.57 }

Assigning a value to a non-existent key results in an error:

table1.foo = "bar" // AN ERROR HAS OCCURED [the index 'foo' does not exist]

In this case use the "new slot" operator:

table1.foo <- "bar" // OK

Methods

clear() removes all key/value pairs from the table
len() returns the number of key/value pairs in this table

Method Documentation


void clear()

Removes all key/value pairs from the table


integer len()

Returns the number of key/value pairs in this table

Returns



Creative Commons Logo This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.