[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table.new in 5.3?
- From: David Heiko Kolf <david@...>
- Date: Sat, 23 Nov 2013 22:48:33 +0100
Sean Conner wrote:
> Given:
>
> t = { 1 , 2 , 3 , ... }
>
> What's the difference between
>
> t = {}
>
> and
>
> table.clear(t)
>
> -spc (Curious about this ... )
There might be other references to the table.
t = { ... }
a = t
table.clear(t) --> a and t are still referencing the same table, which
is now cleared.
t = {} --> t got a new empty table, a has still the old table with all
the values.
Best regards,
David Kolf