[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Expanding variables at function declarion time
- From: Reuben Thomas <rrt@...>
- Date: Thu, 22 Nov 2001 08:35:05 +0000 (GMT)
> > I'm really confused: what's wrong with
> >
> > > function decl(name)\
> > setglobal(name, function () return name .. "!" end)\
> > end
>
> It will not work with Lua 4.0 ;-) (cannot access a variable in outer scope)
I thought the original question was asked about Lua 4.1, but it wasn't. I
think I assumed it was because the example solution given said "upvalues
have their uses after all" and was given in a 4.1 session...