ldmud-3.2.9/doc/
ldmud-3.2.9/doc/efun/
ldmud-3.2.9/mud/
ldmud-3.2.9/mud/heaven7/
ldmud-3.2.9/mud/heaven7/lib/
ldmud-3.2.9/mud/lp-245/
ldmud-3.2.9/mud/lp-245/banish/
ldmud-3.2.9/mud/lp-245/doc/
ldmud-3.2.9/mud/lp-245/doc/examples/
ldmud-3.2.9/mud/lp-245/doc/sefun/
ldmud-3.2.9/mud/lp-245/log/
ldmud-3.2.9/mud/lp-245/obj/Go/
ldmud-3.2.9/mud/lp-245/players/lars/
ldmud-3.2.9/mud/lp-245/room/death/
ldmud-3.2.9/mud/lp-245/room/maze1/
ldmud-3.2.9/mud/lp-245/room/sub/
ldmud-3.2.9/mud/lp-245/secure/
ldmud-3.2.9/mud/morgengrauen/
ldmud-3.2.9/mud/morgengrauen/lib/
ldmud-3.2.9/mud/sticklib/
ldmud-3.2.9/mud/sticklib/src/
ldmud-3.2.9/mudlib/uni-crasher/
ldmud-3.2.9/pkg/
ldmud-3.2.9/pkg/debugger/
ldmud-3.2.9/pkg/diff/
ldmud-3.2.9/pkg/misc/
ldmud-3.2.9/src/autoconf/
ldmud-3.2.9/src/bugs/
ldmud-3.2.9/src/bugs/MudCompress/
ldmud-3.2.9/src/bugs/b-020916-files/
ldmud-3.2.9/src/bugs/doomdark/
ldmud-3.2.9/src/bugs/ferrycode/ferry/
ldmud-3.2.9/src/bugs/ferrycode/obj/
ldmud-3.2.9/src/bugs/psql/
ldmud-3.2.9/src/done/
ldmud-3.2.9/src/done/order_alist/
ldmud-3.2.9/src/done/order_alist/obj/
ldmud-3.2.9/src/done/order_alist/room/
ldmud-3.2.9/src/gcc/
ldmud-3.2.9/src/gcc/2.7.0/
ldmud-3.2.9/src/gcc/2.7.1/
ldmud-3.2.9/src/hosts/
ldmud-3.2.9/src/hosts/GnuWin32/
ldmud-3.2.9/src/hosts/amiga/NetIncl/
ldmud-3.2.9/src/hosts/amiga/NetIncl/netinet/
ldmud-3.2.9/src/hosts/amiga/NetIncl/sys/
ldmud-3.2.9/src/hosts/i386/
ldmud-3.2.9/src/hosts/msdos/byacc/
ldmud-3.2.9/src/hosts/msdos/doc/
ldmud-3.2.9/src/hosts/os2/
ldmud-3.2.9/src/hosts/win32/
ldmud-3.2.9/src/util/
ldmud-3.2.9/src/util/erq/
ldmud-3.2.9/src/util/indent/hosts/next/
ldmud-3.2.9/src/util/xerq/
ldmud-3.2.9/src/util/xerq/lpc/
ldmud-3.2.9/src/util/xerq/lpc/www/
Short: Efun this_function()
From: "Wolf Dieter Dallinger" <wolf.dieter@dallinger.de>
Date: Sun, 31 Mar 2002 13:57:53 +0200
Type: Feature
State: New

This is a multi-part message in MIME format.

------=_NextPart_000_0005_01C1D8BC.0D668B80
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi, Lars!

Ich will einen Call-Out starten, der etwas macht und dann erneut =
gestartet wird. Das geht mit einer Lfun problemlos:

    void fun()
    {
        add_count(-1);
        call_out("fun", 3600);
    }

    call_out("fun", 3600);

Schoen waere es, wenn man das auch mit einer Inline-Closure machen =
koennte. Dazu braeuchte man aber wohl eine Funktion this_function(), die =
eine Closure auf die entsprechende Lfun liefert:

    call_out((:
        add_count(-1);
        call_out(this_function(), 3600);
        :), 3600);

Allgemein:

-------------------------------------------------------------------------=
------
SYNOPSIS
        closure this_function()

BESCHREIBUNG
        Liefert einen Funktionszeiger (Closure) auf die Lfun oder die
        Lambda-Funktion, die gerade abgearbeitet wird.

BEISPIELE
        Call-Outs, die sich selber neu starten:

            call_out((:
                tue_irgendwas();
                call_out(this_function(), 60);
                :), 60);

            call_out(lambda(0, ({
                #',,
                ({ #'tue_irgendwas }),
                ({ #'call_out, ({ #'this_function }), 60 }),
                })));

        Einen Funktionszeiger irgendwo eintragen, der sich automatisch =
nach
        einmaligem Aufruf wieder austraegt:

            add_closure((:
                tue_irgendwas();
                delete_closure(this_function());
                :));

SIEHE AUCH
        closures(LPC)
-------------------------------------------------------------------------=
------

Ich wuerde mich ueber ein this_function() freuen.

Schoene Ostern!

Gruss

Pulami@UNItopia

Wolf Dieter Dallinger
Eckartshaldenweg 11 - D-70191 Stuttgart
Tel. (07 11) 25 67 55-0 - Fax (07 11) 25 67 55-5
Email wolf.dieter@dallinger.de
WWW http://www.dallinger.de/wolf.dieter/

------=_NextPart_000_0005_01C1D8BC.0D668B80
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2715.400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi, Lars!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Ich will einen Call-Out starten, der =
etwas macht=20
und dann erneut gestartet wird. Das geht mit einer Lfun =
problemlos:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; void =
fun()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; {</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
add_count(-1);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; call_out("fun",=20
3600);<BR></FONT><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; =
}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; call_out("fun",=20
3600);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Schoen waere es, wenn man das auch mit =
einer=20
Inline-Closure machen koennte. Dazu braeuchte man aber wohl eine =
Funktion=20
this_function(), die eine Closure auf die entsprechende Lfun=20
liefert:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;=20
call_out((:<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
add_count(-1);<BR>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
call_out(this_function(), 3600);<BR>&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp; :),=20
3600);<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Allgemein:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>----------------------------------------------------------------=
---------------</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>SYNOPSIS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; closure=20
this_function()</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>BESCHREIBUNG<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Liefert einen=20
Funktionszeiger (Closure) auf die Lfun oder=20
die<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lambda-Funktion, die =
gerade=20
abgearbeitet wird.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>BEISPIELE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Call-Outs, die=20
sich selber neu starten:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
call_out((:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
tue_irgendwas();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
call_out(this_function(),=20
60);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;=20
:), 60);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
call_out(lambda(0,=20
({<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;=20
#',,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;=20
({ #'tue_irgendwas=20
}),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;=20
({ #'call_out, ({ #'this_function }), 60=20
}),<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;=20
})));</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Einen=20
Funktionszeiger irgendwo eintragen, der sich automatisch=20
nach<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; einmaligem Aufruf =
wieder=20
austraegt:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;=20
add_closure((:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
tue_irgendwas();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
delete_closure(this_function());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
:));</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>SIEHE=20
AUCH<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
closures(LPC)<BR></FONT><FONT=20
face=3DArial=20
size=3D2>----------------------------------------------------------------=
---------------</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Ich wuerde mich ueber ein =
this_function()=20
freuen.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Schoene Ostern!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Gruss</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"mailto:Pulami@UNItopia">Pulami@UNItopia</A></DIV>
<DIV><BR>Wolf Dieter Dallinger<BR>Eckartshaldenweg 11 - D-70191=20
Stuttgart<BR>Tel. (07 11) 25 67 55-0 - Fax (07 11) 25 67 55-5<BR>Email =
<A=20
href=3D"mailto:wolf.dieter@dallinger.de">wolf.dieter@dallinger.de</A><BR>=
WWW <A=20
href=3D"http://www.dallinger.de/wolf.dieter/">http://www.dallinger.de/wol=
f.dieter/</A></FONT></DIV></BODY></HTML>

------=_NextPart_000_0005_01C1D8BC.0D668B80--