lua-users home
lua-l archive

mass alias assignment?

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


I am redoing my scientific lamp website. While the holders are different one lamp may fit in a hundred different instruments.
I want to model everything in pure Lua.
As tables are anonymous, more then one variable can point to the same table:
dog = {'bark', 'bark', 'bark'}
cat = dog
print(cat[1])--> bark
Is there a way to assign let's say 50 names to the one table in a few lines?
Thanks for reading-Patrick

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