lua-users home
lua-l archive

Re: Global by default

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


On 2013年2月13日 09:54:32 +0100
Alex Queiroz <asandroq@gmail.com> wrote:
> On Wed, Feb 13, 2013 at 9:51 AM, Steve Litt
> <slitt@troubleshooters.com> wrote:
> >
> > Next question: Is it per function, or per function invocation. In
> > other words, if I recursively called a function with 10 local
> > variables, would it break when I went 26 recursions deep?
> >
> 
> It's per function invocation.
Well cool! Long before 256 locals per invocation would break the code,
30 locals per invocation would break my mind. I'd use a table (or table
of tables or whatever) for everything except those things that needed
to keep their local values.
SteveT

AltStyle によって変換されたページ (->オリジナル) /