lua-users home
lua-l archive

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


> 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