OPTIONAL SYNOPSIS int assoc (mixed key, mixed *keys) mixed assoc (mixed key, mixed *alist [, mixed fail] ) mixed assoc (mixed key, mixed *keys, mixed *data [, mixed fail] ) DESCRIPTION All invocation forms search for a in an (an array of two equal-sized arrays) or in an ordered array . An attempt to search in any other structure will yield an unpredictable result. Complexity: O( lg(n) ) , where n is the number of keys. 1. Form: Key Search is searched in the array , result is the index at which was found. If it isn't found, -1 is returned. 2. Form: Alist Lookup is searched in the , result is the data associated with if it is found. If it isn't found, the result will be 0, or if specified. 3. Form: Ordered List Lookup is searched in the array , the index at which it is found is as index into to get the return value. If is not found, the reuslt will be 0, or if specified. For this to be useful, has to be ordered so that it matches . This form of lookup is therefore used primarily with multidimensional alists. The function is available only if the driver is compiled with alist support. In that case, __ALISTS__ is defined. HISTORY LDMud 3.3 made this an optional efun. SEE ALSO alists(LPC), insert_alist(E), order_alist(E)