[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A few little questions
- From: "Peter Shook" <pshook@...>
- Date: Thu, 11 Jan 2001 19:02:48 -0500
On Wed, Jan 10, 2001 at 08:57:29PM +0000, Reuben Thomas wrote:
> Some things that came up in a bout of hacking over Christmas:
>
> 1. Why can't inner functions be defined for local values? I mean that:
>
> function y ()
> function f() ...
> end
> end
>
> works, but
>
> function y ()
> local f = function g()
> function h()
> end
> end
> end
>
Check out The Complete Syntax of Lua in the back of the Lua manual and you'll
see that you need to delete the 'g', like so
function y ()
local f = function()
function h()
end
end
end
Cheers,
- Peter