Reference
Maps
Lookup tables from a key to a value.
map.clear(id)
Removes every key.
Returns: nothing
| Parameter | Type |
|---|---|
id | map |
map.contains(id, key)
True if the key is present.
Returns: true or false
| Parameter | Type |
|---|---|
id | map |
key | any |
map.copy(id)
A copy of the map.
Returns: the same type as the first argument
| Parameter | Type |
|---|---|
id | map |
map.get(id, key)
The value for key (na if absent).
Returns: vals0
| Parameter | Type |
|---|---|
id | map |
key | any |
map.keys(id)
An array of the keys, in insertion order.
Returns: keys0
| Parameter | Type |
|---|---|
id | map |
map.new()
A new map (write the types: map.new<string, float>()).
Returns: newmap
map.put(id, key, value)
Sets the value for key.
Returns: nothing
| Parameter | Type |
|---|---|
id | map |
key | any |
value | any |
map.put_all(id, id2)
Copies every key of id2 into id.
Returns: nothing
| Parameter | Type |
|---|---|
id | map |
id2 | map |
map.remove(id, key)
Removes the key and returns its value.
Returns: vals0
| Parameter | Type |
|---|---|
id | map |
key | any |
map.size(id)
Number of keys.
Returns: a whole number
| Parameter | Type |
|---|---|
id | map |
map.values(id)
An array of the values, in insertion order.
Returns: valarr0
| Parameter | Type |
|---|---|
id | map |
Education only. Not financial advice. Examples are teaching samples, not trading results.
