Dokumentation zu: funcall(E)

HR Image


SYNOPSIS
        mixed funcall(closure cl, mixed arg ...)

DESCRIPTION
        Evaluates the closure. The extra args will be passed as args
        to the closure. If cl is not a closure, it will simply be
        returned.

EXAMPLES
        mixed eval(object ob, string func, mixed *args)
        {
            return funcall(#'call_other, ob, func, args);
        }

        This will result in calling

          ob->func(args).

        In combination with the '...' operator, the functionality
        of apply() can be implemented:

        mixed eval(object ob, string func, mixed *args)
        {
            return funcall(#'call_other, ob, func, args...);
        }

        will result in calling

          ob->func(args[0],args[1],...,args[sizeof(args)-1]).

HISTORY
        Introduced in 3.2@70.
        Returning a non-closure as it is even when args are given was
        introduced with 3.2.1.

SEE ALSO
        apply(E), quote(E)

Die Seite ist auch in Deutsch vorhanden.

Start » Magierhandbuch » Docu » Efun » Funcall Letzte Generierung: 25.04.2021, 01:58
Email an: mud@wl.mud.de
Valid HTML 4.01!