[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (beta) now available
- From: Tom N Harris <telliamed@...>
- Date: Mon, 27 Oct 2014 13:36:51 -0400
On Monday, October 27, 2014 09:55:38 AM Dirk Laurie wrote:
> You could do
>
> wanted = select(i,struct.unpack(fmt,s))
>
> or keep the desired format options as a list, then
>
> offset = #struct.pack(table.concat(options,1,i-1))
> nwanted = #offset+1 -- do this once and for all
> wanted = struct.unpack(options[i],s,nwanted)
A few months ago I experimented with allowing `nil` on the left side of
assignment to discard individual results.
http://lua-users.org/lists/lua-l/2014-06/msg00249.html
Should still apply to the beta. At least, I haven't had to deal with any
conflicts when merging the releases.
--
tom <telliamed@whoopdedo.org>