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






      Insert a byte array into a byte buffer.


Calling Sequence

      bytarr_put, buf, in


      in = byte array to add to buffer. in

Keyword Parameters


        INDEX=indx Returned index of inserted byte array:
          0=1st, 1=2nd, ... Can be used with bytarr_get to
          retrieve a given array.
        ADDRESS=a returned byte address into buffer for in.


Common Blocks


      Notes: To start set input buffer b to 1 element:
        b = [0B] before using in bytarr_put.
        Can use this routine to build up an array of
        variable lengths arrays, or pack arrays of any data
        type together in a compact form. Must convert input
        to a byte array first using field extraction. Ex:
        a=indgen(10) & b=byte(a,0,2*n_elements(a)) will create
        an int array and convert it to a byte array.
        The inverse routine, bytarr_get, allows extraction by
        index number (1st input is 0, 2nd is 1, ...).
        You must handle converting from byte when extracting.

Modification History

      R. Sterner, 1996 May 30
      R. Sterner, 2010 Apr 30 --- Converted arrays from () to [].
  Copyright (C) 1996, 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