lua-users home
lua-l archive

Re: lpack question

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


> I think you want
> 
> local pos, mopt_unpack = string.unpack('i', block)
Oops! Better:
 local pos, mopt_unpack = string.unpack(block, 'i')
Sorry for the noise. As a suggestion, I guess a more consistent interface
would be pack(f, ...) and unpack(f, s [,init]), similarly to Roberto's struct
lib.
Cheers,
Luis.
-- 
A mathematician is a device for turning coffee into theorems.
 -- P. Erdos 
-- 
Luis Carvalho
Applied Math PhD Student
Brown University

AltStyle によって変換されたページ (->オリジナル) /