ldmud-3.4.1/doc/
ldmud-3.4.1/doc/efun.de/
ldmud-3.4.1/doc/efun/
ldmud-3.4.1/doc/man/
ldmud-3.4.1/doc/other/
ldmud-3.4.1/mud/
ldmud-3.4.1/mud/heaven7/
ldmud-3.4.1/mud/lp-245/
ldmud-3.4.1/mud/lp-245/banish/
ldmud-3.4.1/mud/lp-245/doc/
ldmud-3.4.1/mud/lp-245/doc/examples/
ldmud-3.4.1/mud/lp-245/doc/sefun/
ldmud-3.4.1/mud/lp-245/log/
ldmud-3.4.1/mud/lp-245/obj/Go/
ldmud-3.4.1/mud/lp-245/players/lars/
ldmud-3.4.1/mud/lp-245/room/death/
ldmud-3.4.1/mud/lp-245/room/maze1/
ldmud-3.4.1/mud/lp-245/room/sub/
ldmud-3.4.1/mud/lp-245/secure/
ldmud-3.4.1/mud/morgengrauen/
ldmud-3.4.1/mud/morgengrauen/lib/
ldmud-3.4.1/mud/sticklib/
ldmud-3.4.1/mud/sticklib/src/
ldmud-3.4.1/mudlib/uni-crasher/
ldmud-3.4.1/pkg/
ldmud-3.4.1/pkg/debugger/
ldmud-3.4.1/pkg/diff/
ldmud-3.4.1/pkg/misc/
ldmud-3.4.1/src/autoconf/
ldmud-3.4.1/src/hosts/
ldmud-3.4.1/src/hosts/GnuWin32/
ldmud-3.4.1/src/hosts/amiga/
ldmud-3.4.1/src/hosts/win32/
ldmud-3.4.1/src/ptmalloc/
ldmud-3.4.1/src/util/
ldmud-3.4.1/src/util/erq/
ldmud-3.4.1/src/util/indent/hosts/next/
ldmud-3.4.1/src/util/xerq/
ldmud-3.4.1/src/util/xerq/lpc/
ldmud-3.4.1/src/util/xerq/lpc/www/
ldmud-3.4.1/test/t-030925/
ldmud-3.4.1/test/t-040413/
ldmud-3.4.1/test/t-041124/
SYNOPSIS
        mapping mkmapping(mixed *arr1, mixed *arr2,...)
        mapping mkmapping(struct st)

DESCRIPTION
        The first form returns a mapping with indices from 'arr1' and
        values from 'arr2'... . arr1[0] will index arr2...[0], arr1[1]
        will index arr2...[1], etc. If the arrays are of unequal size,
        the mapping will only contain as much elements as are in the
        smallest array.

        The second form converts the given struct <st> into a mapping
        using the struct member names as index values.

        Normally, mappings are extended by simply inserting new elements.
        This function is useful if you can estimate the needed size of
        the mapping in advance, to reduce the malloc overhead. Any
        unused allocated space will be freed after the current function
        returns.

EXAMPLE
        mkmapping( ({ 1, 2 }), ({ 10, 11 }), ({ 20, 21, 22}))
          returns ([ 1:10;20, 2:11;21 ])

        struct s { int a, b, c; };
        mkmapping( (<s> 1, ({ 2, 3 }), 3 )
          returns ([ "a":1, "b":({2,3}), "c":3 ])

HISTORY
        LDMud 3.3.433 added the conversion from structs.

SEE ALSO
        mappings(LPC), mappingp(E), m_indices(E), m_values(E),
        m_add(E), m_delete(E), sizeof(E), widthof(E), unmkmapping(E),
        to_struct(E)