lua-users home
lua-l archive

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


Hello,

what's the easiest way to copy a given table?

If variable ``source'' references the table, just the assignment
  target = source
won't do it: no new table will be constructed, but ``target'' will
reference the same table as ``source'' (e.g. after the assignment
target[1]=42, source[1] will be set to 42, too).

Regards
  Thomas