Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

external/spdfcdas/spdf_cdawlib/

spdf_str_element.pro


Routines

top source spdf_str_element

spdf_str_element, struct, tagname, value, ADD_REPLACE=ADD_REPLACE, DELETE=DELETE, CLOSEST=CLOSEST, SUCCESS=SUCCESS, VALUE=VALUE, INDEX=INDEX

PROCEDURE: spdf_str_element, struct, tagname, value PURPOSE: Find (or add) an element of a structure. This procedure will not Input: struct, generic structure tagname, string (tag name) Output: value, Named variable in which value of the structure element is returned. Purpose: Retrieves the value of a structure element. This function will not produce an error if the tag and/or structure does not exist. KEYWORDS: SUCCESS: Named variable that will contain a 1 if the element was found or a 0 if not found. INDEX: a named variable in which the element index is returned. The index will be -2 if struct is not a structure, -1 if the tag is not found, and >= 0 if successful. ADD_REPLACE: Set this keyword to add or replace a structure element. DELETE: Set this keyword to delete the tagname. CLOSEST: Set this keyword to allow near matchs (useful with _extra) VALUE: (obsolete) alternate method of returning value. (Will not work with recursion) Notes: 1. Value remains unchanged if the structure element does not exist. 2. If tagname contains a '.' then the structure is recursively searched and index will be an array of indices. 3. If struct is an array then results may be unpredictable. 4. Elements may be inserted into embedded structures, by including the embedded structure name in the tagname string.(example below) Examples: Does an element exist? spdf_str_element,my_str,'my_tag_name',SUCCESS=s What is an element's value? spdf_str_element,my_str,'my_tag_name',v Add an element spdf_str_element,my_str,'my_tag_name','value',/add Add an element to embedded structure: spdf_str_element,my_str,'my_substr_name.my_tag_name','value',/add Modifications: 5/7/97: Added recursive searching of structure hierarchy. D. Larson 2014-1-20 : Added mulidimensional elements for arrays of structures CREATED BY: Davin Larson FILE: spdf_str_element.pro VERSION 1.10 LAST MODIFICATION: 01/10/08 CREATED BY: Davin Larson $LastChangedBy: nikos $ $LastChangedDate: 2014-06-30 13:42:31 -0700 (Mon, 30 Jun 2014) $ $LastChangedRevision: 15467 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/external/spdfcdas/spdf_cdawlib/spdf_str_element.pro $

Parameters

struct
tagname
value

Keywords

ADD_REPLACE
DELETE
CLOSEST
SUCCESS
VALUE
INDEX

File attributes

Modification date: Tue Oct 21 13:53:49 2014
Lines: 128