From: akolarik@... Date: 2002-09-19T06:49:12+09:00 Subject: RE: signed hex conversion This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C25F5D.3796C460 Content-Type: text/plain; charset="iso-8859-1" > There's probably a better way, but: > > [0xFFFFFFC4].pack("l").unpack("l")[0] # => -60 > > -- Dossy I definitely wouldn't have stumbled on that for a while ;-) Guess I'll have to check the doc to figure out what's going on there, but in the meantime it works! Thanks a lot, -- Tony ------_=_NextPart_001_01C25F5D.3796C460 Content-Type: text/html; charset="iso-8859-1" RE: signed hex conversion

> There's probably a better way, but:
>
> [0xFFFFFFC4].pack("l").unpack("l")[0]   # => -60
>
> -- Dossy

I definitely wouldn't have stumbled on that for a while ;-)
Guess I'll have to check the doc to figure out what's going on there, but in the meantime it works! 
Thanks a lot,
 -- Tony

------_=_NextPart_001_01C25F5D.3796C460--