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

Synopsis

Generate a list of functions and variables

Syntax

Array_Type _apropos (String_Type ns, String_Type s, Integer_Type flags)

Description

The _apropos function may be used to get a list of all defined objects in the namespace ns whose name matches the regular expression s and whose type matches those specified by flags. It returns an array of strings representing the matches.

The second parameter flags is a bit mapped value whose bits are defined according to the following table

     1          Intrinsic Function
     2          User-defined Function
     4          Intrinsic Variable
     8          User-defined Variable

Example

    define apropos (s)
    {
      variable n, name, a;
      a = _apropos ("Global", s, 0xF);

      vmessage ("Found %d matches:", length (a));
      foreach (a)
        {
           name = ();
           message (name);
        }
    }

prints a list of all matches.

If the namespace specifier ns is the empty string "", then the namespace will default to the static namespace of the current compilation unit.

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.