Dokumentation zu: sizeof(E)

HR Image

        int sizeof(mixed * val)
        int sizeof(string  val)
        int sizeof(bytes   val)
        int sizeof(mapping val)
        int sizeof(struct xxx val)

        Returns the number of elements of an array or struct, the number of
        characters in a string, number of bytes in a byte sequence, or the
        number of keys in a mapping.

        As a special case, the number 0 can be passed, and the function
        will return 0.

        If there were any objects destroyed in the game since the mapping was
        last checked for destructed keys, the mapping() needs to be checked
        for destructed objects in keys first. In that case, the runtime
        increases linear with the number of keys in the mapping (O(n)).
        Otherwise the runtime is independent of the mappings size (O(1)).

        LDMud 3.2.9 added strings to the possible parameters.
        LDMud 3.3 added support for structs.

        strlen(E), allocate(E), pointerp(E), mappingp(E), m_allocate(E),
        widthof(E), text_width(E)

Die Seite ist auch in Deutsch vorhanden.

Start » Magierhandbuch » Docu » Efun » Sizeof Letzte Generierung: 25.04.2021, 01:58
Email an:
Valid HTML 4.01!