[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
New Address!   --   Neue Adresse!
[Uni logo]


TAG_EXIST() Source code in tag_exist.pro

TAG_EXIST()

Name
       TAG_EXIST()
Purpose
       To test whether a tag name exists in a structure.
Explanation
       Routine obtains a list of tagnames and tests whether the requested one
       exists or not. The search is recursive so if any tag names in the
       structure are themselves structures the search drops down to that level.
       (However, see the keyword TOP_LEVEL).
Calling Sequence
       status = TAG_EXIST(str, tag, [ INDEX =, /TOP_LEVEL ] )
Input Parameters
       str  -  structure variable to search
       tag  -  tag name to search for, scalar string
Output Parameters
       Function returns 1b if tag name exists or 0b if it does not.
Keyword Parameters
       TOP_LEVEL = If set, then only the top level of the structure is
                           searched.
Optional Keyword Output
       INDEX = index of matching tag, scalar longward, -1 if tag name does
               not exist
Example
       Determine if the tag 'THICK' is in the !P system variable
       IDL> print,tag_exist(!P,'THICK')
Procedures Used
       None.
 MODIFICATION HISTORY:     :
       Written,       C D Pike, RAL, 18-May-94
       Passed out index of matching tag,  D Zarro, ARC/GSFC, 27-Jan-95
       William Thompson, GSFC, 6 March 1996    Added keyword TOP_LEVEL
       Zarro, GSFC, 1 August 1996    Added call to help
       Converted to IDL V5.0   W. Landsman   September 1997
       Use SIZE(/TNAME) rather than DATATYPE()  W. Landsman  October 2001

Last modified by pro2html on 2001 November 09 at 04:48 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically