lua-users home
lua-l archive

constant table overflow

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


Try this script (in Lua 5.1.4):
local t = {}
for i = 1,2^18 do
 t[#t+1] = '(function() return '..i..' end)();\n'
end
print( loadstring( table.concat( t ) ) )
I always thought that the constant table limit is per function. But why do I get this output:
 nil constant table overflow
I think I am missing something here. 
 Jörg

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