lua-users home
lua-l archive

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


On Mon, Apr 27, 2015 at 3:50 PM, Coda Highland <chighland@gmail.com> wrote:

local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
local a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a,a
a={{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}

This will make LuaJIT throw the same error.

/s/ Adam


200 local variables is the limit, so use one less and LuaJIT will NOT throw the error.

My code is a simplified version (thus all variables have the same name) of real life
automatically generated script, which has about 160 local vars and some number of
big matrices containing numeric data.
According to language manual, such code is completely legal.
If some strange complexity limitations are exist in vanilla Lua implementation, they
must be clearly declared in the manual.

Is Lua really suitable only for short human-written code?

--Egor