From: "Ara.T.Howard" Date: 2005-09-01T04:28:53+09:00 Subject: Re: how to convert binary array into integer On Thu, 1 Sep 2005, hsun wrote: > Hi, > > Does anyone know the api to convert a binary array into integer: > > for example: 00 00 00 0A => 10 > > thanks harp:~ > cat a.rb p( [0x0, 0x0, 0x0, 0xA].pack('c*').unpack('N').first ) harp:~ > ruby a.rb 10 hth. -a -- =============================================================================== | email :: ara [dot] t [dot] howard [at] noaa [dot] gov | phone :: 303.497.6469 | Your life dwells amoung the causes of death | Like a lamp standing in a strong breeze. --Nagarjuna ===============================================================================