[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: "Roberto's book..."
- From: Asko Kauppi <Asko.Kauppi@...>
- Date: Tue, 28 May 2002 08:35:58 +0300
Is that publicly available and if so, where?
I would be interested but don't find a link anywhere.
-ak
--
Asko Kauppi
Flextronics Design Finland
Box 23, 39201 Kyröskoski, Finland
www.flextronics.com
> -----Original Message-----
> From: Diego Nehab [SMTP:diego@tecgraf.puc-rio.br]
> Sent: Monday, May 27, 2002 11:57 PM
> To: Multiple recipients of list
> Subject: Re: [lua-l] Digest Number 734
>
> > I feel awfully stupid, but could anyone explain (or give a reference
> > for) what a "closure" is?
>
> In Lua, from the C API point of view, a closure is an object created by
> the association of a function object and a set of data values. To create
> a closure, use the lua_pushcclosure API function. When the closure is
> called, the associated function is called and these values (called
> upvalues) can then be accessed directly from the top of the stack (Lua
> 4.0), or with special indexes (Lua 4.1 on).
>
> The question was if it was possible to extract the upvalues from a
> closure without calling the closure.
>
> For some nice uses of closures, check the Wiki or Roberto's book.
>
> Best regards,
> Diego.
>
###########################################
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.