Previous SAXO Documentation Assistant: Overview Next

ToBeReviewed/LECTURE/

inverse_binary.pro

Inverse function of the binary.pro function => given a input array of 0/1, return its corresponding byte/integer/long representation

inverse_binary

result = inverse_binary(binnumb)

Return value

A byte/integer/long array with (d1, d2...) dimensions

Parameters

binnumb        in required

Must be a binary type array containing only 0 and 1. According to binary.pro outputs, binnum array must have the following dimensions values: (8, t, d1, d2...) t gives the output type: t = 1 -> byte t = 2 -> integer t = 4 -> long (d1, d2...) are the output dimensions

Examples

IDL> a=indgen(5) IDL> b=binary(a) IDL> help, b B BYTE = Array[8, 2, 5] IDL> print, b 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 IDL> help, inverse_binary(b) INT = Array[5] IDL> print, inverse_binary(b) 0 1 2 3 4

Version history

Version

$Id: inverse_binary.pro 157 2006-08-21 09:01:50Z navarro $

History

Sebastien Masson (smasson@jamstec.go.jp) July 2004

Known issues

Restrictions

The binary number can represent only byte/integer/long

 


  Produced by IDLdoc 2.0.