lua-users home
lua-l archive

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


Hi,

At least from my perspective unpack seems to behave strangely when dealing with nils - as you can see from the output below. 

Is this expected behaviour? 

How can I get unpack({nil,2,nil}) to return nil,2?

> print(unpack({nil,2}))
nil 2
> print(unpack({nil,2,nil}))

> print(unpack({nil,2,3,nil}))
nil 2 3



Thanks

Mark