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/is_list_element.tm.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 is_list_element Context: slangrtl

Synopsis

Test whether a delimited string contains a specific element

Syntax

Integer_Type is_list_element (String_Type list, String_Type elem,
Integer_Type delim)

Description

The is_list_element function may be used to determine whether or not a delimited list of strings, list, contains the element elem. If elem is not an element of list, the function will return zero, otherwise, it returns 1 plus the matching element number.

Example

The expression

     is_list_element ("element 0, element 1, element 2", "0,", ' ');

returns 2 since "0," is element number one of the list (numbered from zero).

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.