lua-users home
lua-l archive

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

On Wed, Sep 14, 2016 at 3:37 AM,  <> wrote:
> OK, I get it. Thx 4 explanation. But can you also explain to me next behavior?
>> table.unpack{"a",nil,"c"}
> a       nil     c
>> table.unpack{[1]="a",[2]=nil,[3]="c"}
> a
> I am still confused with sequences, but I hope I will understand it soon.

table.unpack works only with sequences. As the arguments here are not
sequences, the result of the call is undefined, meaning that different
results can sometimes be obtained from identical arguments (and those
results may or may not be meaningful).