lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


--> Thursday, January 9, 2003, 9:11:13 AM, you wrote:

> Try

>   function f(t)
>    local a,b,c=t.a,t.b,t.c
>    ...
>   end

>   f{c=999,a=0}

> Note the {} instead of () in the function call.

Hehe, I like that, thanks.

> The solution adopted in Lua 5.0 is that every function (including the "main"
> function in each chunk) has its own table of globals, which can be changed.
> With adequate metamethods set for these table of globals, you can have a
> sort of implicit declaration of locals, flag writes to global variables,
> and much more.

Is this also in 4w4? That is what my current application uses.

-Toyotomi