up | previous | next | Tom Wetmore | email@example.com | LifeLines
These functions provide general purpose, keyed tables. A table must be declared with the table function before it can be used.
|void table(table_v)||Table creates and returns an empty table. Its parameter is a variable. Every table must be declared in this way. Table can also be used to make an existing table empty, though this causes a memory leak.|
|void insert(table, string, any)||Insert adds an object and its key to a table. Its first parameter is a table; the second parameter is the object's key; and the third parameter is the object itself. The key must be a string and the object can be any value. If there already is an object in the table with that key, the old object is replaced with the new.|
|any lookup(table, string)||Lookup retrieves an object from a table. Its first parameter is a table, and the second parameter is the object's key. The function returns the object with that key from the table; if there is no such object, null is returned.|
up | previous | next | Tom Wetmore | firstname.lastname@example.org | LifeLines1/1/00