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
===============================================================================