lua-users home
lua-l archive

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

> I used the wrong cut and paste here: there ought to be another line
> prior to the print lines:
>   local mopt_unpack = string.unpack('l',block)

I think you want

  local pos, mopt_unpack = string.unpack('i', block)

Most likely your long has 64 bits, which makes string.unpack return 1.


A mathematician is a device for turning coffee into theorems.
        -- P. Erdos 

Luis Carvalho
Applied Math PhD Student
Brown University