>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  BIT_GET

BIT_GET

BIT_GET

Name


      BIT_GET

Purpose


      Pick out specified bits from a value.

Category


Calling Sequence


      out = bit_get(in, s, n)

Inputs


      in = integer value (scalar or array) to pick from. in
      s = bit number to start at (LSB is 0). in
      n = number of bits to pick out (def=1). in

Keyword Parameters


Keywords


        /REDUCE means reduce extracted value to smallest
          data type possible (unsigned) based on # bits (n).

Outputs


      out = returned value. out

Common Blocks


Notes


      Notes: Input value must be an integer data type:
        byte, int, u_int, long, u_long, long_64, u_long_64
        Returned value is same data type unless /REDUCE is used.

Modification History


      R. Sterner, 1999 Jun 3 written as getbits.pro.
      R. Sterner, 2002 Oct 15 --- Added /REDUCE, also forced num numeric.
      R. Sterner, 2004 Feb 20 --- Howard Taylor found typo: ulon --> ulong.
      R. Sterner, 2011 Aug 25 --- Renamed to bit_get.pro.
  Copyright (C) 1999, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us