title: converting 2 bytes into one 16bit integer in IDL
body: <p>I have an array of bytes (char1) and I have to go through converting them to specific data types. For example the first two bytes in the array need to be converted to ascii characters so I just cast them using</p>
  
  <pre><code>    c = string(char1[0])
  </code></pre>
  
  <p>but for char1[2] and char1[3] I need a 16bit unsigned integer so how would I go about combining those two bytes and casting them as uint? I'm looking for a general answer as I will need to convert to types ranging from 1 byte up to 8 bytes.</p>
  
  <p>Thanks</p>