b.c

ldmud-3.4.1/test/t-041124/b.c · 1.1 KB

From the archive ldmud-3.4.1.tar.gz

Download the archive   « Back to the archive contents

inherit "/a";
inherit "/c";
#if 1
int sub() {
   debug_message("b::sub()\n"); 
}
#endif
int main() {
    debug_message(sprintf("#'a::sub : %O\n", #'a::sub));
    debug_message(sprintf("#'c::sub : %O\n", #'c::sub));
    debug_message(sprintf("#'::sub : %O\n", #'::sub));
    debug_message(sprintf("#'sub : %O\n", #'sub));
    debug_message("funcall #'a::sub\n");
    funcall(#'a::sub);
    debug_message("funcall #'c::sub\n");
    funcall(#'c::sub);
    debug_message("funcall #'::sub\n");
    funcall(#'::sub);
    debug_message("funcall #'sub\n");
    funcall(#'sub);
    debug_message("\n");
    debug_message("calling a::sub()\n");
    a::sub();
    debug_message("calling c::sub()\n");
    c::sub();
    debug_message("calling sub()\n");
    sub();
    debug_message("calling a::sub() via lambda\n");
    funcall(lambda(0, ({#'a::sub})));
    debug_message("calling c::sub() via lambda\n");
    funcall(lambda(0, ({#'c::sub})));

    mixed *a = ({ #'a::sub, #'c::sub, #'::sub, #'sub });
    string s = save_value(a);
    mixed *b = restore_value(s);

    debug_message(sprintf("%O -> %O -> %O\n", a, s, b));
}

Site Stats

Snippets: 1791
Codebases: 571