ldmud-3.3.719/
ldmud-3.3.719/doc/
ldmud-3.3.719/doc/efun.de/
ldmud-3.3.719/doc/efun/
ldmud-3.3.719/doc/man/
ldmud-3.3.719/doc/other/
ldmud-3.3.719/mud/
ldmud-3.3.719/mud/heaven7/
ldmud-3.3.719/mud/lp-245/
ldmud-3.3.719/mud/lp-245/banish/
ldmud-3.3.719/mud/lp-245/doc/
ldmud-3.3.719/mud/lp-245/doc/examples/
ldmud-3.3.719/mud/lp-245/doc/sefun/
ldmud-3.3.719/mud/lp-245/log/
ldmud-3.3.719/mud/lp-245/obj/Go/
ldmud-3.3.719/mud/lp-245/players/lars/
ldmud-3.3.719/mud/lp-245/room/death/
ldmud-3.3.719/mud/lp-245/room/maze1/
ldmud-3.3.719/mud/lp-245/room/sub/
ldmud-3.3.719/mud/lp-245/secure/
ldmud-3.3.719/mud/sticklib/
ldmud-3.3.719/mud/sticklib/src/
ldmud-3.3.719/mudlib/deprecated/
ldmud-3.3.719/mudlib/uni-crasher/
ldmud-3.3.719/pkg/
ldmud-3.3.719/pkg/debugger/
ldmud-3.3.719/pkg/diff/
ldmud-3.3.719/pkg/misc/
ldmud-3.3.719/src/
ldmud-3.3.719/src/autoconf/
ldmud-3.3.719/src/ptmalloc/
ldmud-3.3.719/src/util/
ldmud-3.3.719/src/util/erq/
ldmud-3.3.719/src/util/indent/hosts/next/
ldmud-3.3.719/src/util/xerq/
ldmud-3.3.719/src/util/xerq/lpc/
ldmud-3.3.719/src/util/xerq/lpc/www/
ldmud-3.3.719/test/generic/
ldmud-3.3.719/test/inc/
ldmud-3.3.719/test/t-0000398/
ldmud-3.3.719/test/t-0000548/
ldmud-3.3.719/test/t-030925/
ldmud-3.3.719/test/t-040413/
ldmud-3.3.719/test/t-041124/
ldmud-3.3.719/test/t-language/
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 <key> in an <alist> (an array
        of two equal-sized arrays) or in an ordered array <keys>.
        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

          <key> is searched in the array <keys>, result is the index at
          which <key> was found. If it isn't found, -1 is returned.


        2. Form: Alist Lookup

          <key> is searched in the <alist>, result is the data associated
          with <key> if it is found. If it isn't found, the result
          will be 0, or <fail> if specified.


        3. Form: Ordered List Lookup

          <key> is searched in the array <keys>, the index at which it
          is found is as index into <data> to get the return value.
          If <key> is not found, the reuslt will be 0, or <fail> if
          specified.

          For this to be useful, <data> has to be ordered so that
          it matches <key>. 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)