Create an empty table:
Create a table with two entries 1=22 and 2=42:
Create a table with two entries at specified indices:
Fetch a value from a table using square-bracket notation:
When an index doesn't map to a value, the query will return unevaluated:
Use the assigned function to check if an entry exists
The sparse indexing function can be used to set a default for lookups rather than returning unevaluated
The default for sparse tables is to return 0 when an index is not found. This can be changed to a constant value that you choose:
Other indexing functions control the lookup based on indices and/or entries in the table:
A table can contain callable procedures: