[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Microlight (was Re: paving cowpaths with libraries)
- From: Sean Conner <sean@...>
- Date: Fri, 17 Feb 2012 03:31:11 -0500
It was thus said that the Great steve donovan once stated:
> On Fri, Feb 17, 2012 at 2:25 AM, ernie <firstname.lastname@example.org> wrote:
> > What is the reason for this on line 148?
> > local tbuff -- <=======
> > function tbuff (t,buff,k)
> > ...
> > end
> tbuff is a recursive local function, so the symbol must be declared
> before the definition. It helps to remember that 'local function f' is
> short for 'local f = function' - so any reference to f in that
> _anonymous_ function doesn't find the local because it's not defined
> local tbuff
> tbuff = function (t,buff,k)
> .-- refer to local tbuff!
But then how does this work?
local function foo(x)
if x == 0 then
-spc (And it does)