[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.1.1 has been frozen
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 13 Jun 2006 12:29:14 -0300
> Do you use:
>
> local function foo( ... )
> end
>
> or
>
> local foo = function( ... )
> end
Both have their uses. They are *not* equivalent if the name foo is used
in the function body:
local function foo( ... ) end
is equivalent to
local foo; foo = function ( ... ) end
In
local foo = function( ... ) end
The local foo does not enter the current until after the end is seen.
--lhf