Function
Inserts an element into a hash table.
Syntax
#include <dx/dx.h>
Error DXInsertHashElement(HashTable hashtable, Element element)
Functional Details
If a hash function was provided at the time the hash table was created, then that function will be used to derive a pseudokey from the contents of element. If no hash function was provided, then the first long integer of element is assumed to be the pseudokey.
If there is already an element stored in the hash table with that pseudokey, the behavior will depend on whether or not a compare function was provided at the time the hash table was created. If one was not provided, the already-stored element will be overwritten with the new one. If a compare function was provided, then it will be used to determine whether the keys associated with the elements are in fact unique. If they are, then each will be stored, up to a maximum of 16 for a given pseudokey.
Element
is defined as:
typedef Pointer Element;
Return Value
Returns OK or returns ERROR and sets an error code.
See Also