View Issue Details

IDProjectCategoryView StatusLast Update
0000288LDMud 3.5Efunspublic2011-02-20 02:01
ReporterlarsAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Summary0000288: New efun this_function()
DescriptionShort: 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.
TagsNo tags attached.

Relationships

has duplicate 0000507 new An efun " this_closure() ", that returns in a closure a pointer to the closure. 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2004-11-27 00:53 lars New Issue
2011-02-20 01:57 zesstra Relationship added has duplicate 0000507
2011-02-20 02:01 zesstra Project LDMud => LDMud 3.5