Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Libraries / Markwardt / ARRDELETE

ARRDELETE

ARRDELETE

Name


  ARRDELETE

Author


  Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
  craigm@lheamail.gsfc.nasa.gov

Purpose


  Remove a portion of an existing array.

Calling Sequence


  NEWARR = ARRDELETE(INIT, [AT=POSITION,] [LENGTH=NELEM])

Description



  ARRDELETE will remove or excise a portion of an existing array,
  INIT, and return it as NEWARR. The returned array will never be
  larger than the initial array.
  By using the keywords AT and LENGTH, which describe the position
  and number of elements to be excised respectively, any segment of
  interest can be removed. By default the first element is removed.

Inputs



  INIT - the initial array, which will have a portion deleted. Any
          data type, including structures, is allowed. Regardless of
          the dimensions of INIT, it is treated as a one-dimensional
          array. If OVERWRITE is not set, then INIT itself is
          unmodified.

Keywords



  AT - a long integer indicating the position of the sub-array to be
        deleted. If AT is non-negative, then the deleted portion
        will be NEWARR[AT:AT+LENGTH-1]. If AT is negative, then it
        represents an index counting from then *end* of INIT,
        starting at -1L.
        Default: 0L (deletion begins with first element).
  LENGTH - a long integer indicating the number of elements to be
          removed.
  OVERWRITE - if set, then INIT will be overwritten in the process of
              generating the new array. Upon return, INIT will be
              undefined.
  COUNT - upon return, the number of elements in the resulting array.
          If all of INIT would have been deleted, then -1L is
          returned and COUNT is set to zero.
  EMPTY1 - if set, then INIT is assumed to be empty (i.e., to have
          zero elements). The actual value passed as INIT is
          ignored.

Returns



  The new array, which is always one-dimensional. If COUNT is zero,
  then the scalar -1L is returned.

See Also



  STORE_ARRAY in IDL Astronomy Library

Modification History


  Written, CM, 02 Mar 2000
  Added OVERWRITE and EMPTY1 keyword, CM 04 Mar 2000
  $Id: arrdelete.pro,v 1.2 2001/03/25 18:10:41 craigm Exp $



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us