lua-users home
lua-l archive

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

On Wed, Feb 2, 2011 at 09:07, Patrick Mc(avery >
> I wanted to generate a bunch of "free standing tables within a namespace but
> not nested in another table. Each table would be a manufacturers part number
> and would start with letters and end with numbers, i.e WOT2930, hence the
> concatenation.

Is there a good reason why not make them all elements of a table?
Table approach is simple, readable and flexible. For example, you can
make your table read-only so that nobody can change the part number
WOT2930 after it is set. With local variables you still can by mistake
reset the value to something wrong or nil.