About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/reverse.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 reverse Context: varmm

Synopsis

S-Lang function to reverse a 1D array

Syntax

Array_Type = reverse( Array_Type a )

Description

This function returns a copy of the input array, where the elements are now in reverse order. The input array must be one dimensional.

This function was taken from the ISIS (the Interactive Spectral Interpretation System) distribution developed at the MIT Center for Space Research: more information on ISIS is available at http://space.mit.edu/CXC/ISIS/.

Example

  chips> x = [20:24]
  chips> y = reverse(x)
  chips> writeascii( stdout, x, y )
  20      24
  21      23
  22      22
  23      21
  24      20

Bugs

See the bugs page for the Varmm library on the CIAO website for an up-to-date listing of known bugs.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.