lua-users home
lua-l archive

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


Hi,

Inspired from a Reddit post, I see that the maximum number of local variables within a scope is 200 ( as defined in lparser.c ).
Here's the snippet:
/* maximum number of local variables per function (must be smaller than 250, due to the bytecode format) */
#define MAXVARS   200

Question-1:
I'd like to know why the comment states 250 and the value for MAXVARS is set to 200.

Question-2:
As a layman, I'd assume the numbers to be powers of 2, like 256, but why's it 200 or 256?

Cheers,
SteveH