lua-users home
lua-l archive

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


Sam Roberts wrote:

Can I convert t to a string in some way that would make it
easy to print the table as a string?

If you don't care about nested tables, this can be done in a
one-liner:


 > t = {foo = "bar", [12] = 16, [{}] = {}}
 > table.foreach(t, print)
 12      16
 table: 0xa06bb08        table: 0xa06c038
 foo     bar

--
Aaron