[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: What controls how many values can be unpacked?
- From: Sam Roberts <vieuxtech@...>
- Date: Wed, 28 Jan 2009 12:54:44 -0800
Experimentally, it appears to be 2048, but is this adjustable, a
compile time option, variable depending on environment?
> function T(i) local t={} for _=1,i do t[_] = _ end return t end
> for i=1,5000 do print(i); unpack(T(i)) end
...
2047
2048
stdin:1: stack overflow (table too big to unpack)
stack traceback:
[C]: in function 'unpack'
stdin:1: in main chunk
[C]: ?
Cheers,
Sam