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/
SYNOPSIS
        mixed to_struct(mixed *|mapping data)
        mixed to_struct(mixed *|mapping data, struct template)
        mixed to_struct(struct)

DESCRIPTION
        The given array or mapping <data> is returned as a struct. If a
        <template> struct is given, the returned struct is of the same
        type; without a template, an anonymous struct is returned.

        Structs are returned unchanged.

        If <data> is an array, its elements are assigned in order to the
        resulting struct. For an anonymous struct, all elements of <data>
        are assigned, for a templated struct only as many as fit into
        the struct.

        If <data> is a mapping and no template is given, the resulting
        anonymous struct contains all elements from <data> with a string
        key; the key name is used as struct member name.

        If <data> is a mapping and a template is given, the struct
        member names are used as keys for lookups in <data>; the found
        data is assigned to the struct members.

        Since the returned struct can't be known at compile time, the
        efun is declared to return 'mixed'.

HISTORY
        Introduced in LDMud 3.3.250 .
        LDMud 3.3.344 added the template argument.
        LDMud 3.3.433 added the conversion from mappings.


SEE ALSO
        to_array(E), to_string(E), mkmapping(E), structs(LPC)