ToBeReviewed/STRUCTURE/
extractstru.pro
extract elements of a structure to constitute a new structure.
extractstru
Utilities
result = extractstru(stru, liste, KEEP=KEEP, DELETE=DELETE)
Return value
A structure or -1 in case of problem
Parameters
stru
in
required
A structure
liste
in
required
type: vector
A vector of string including names of STRU to be deleted
(by default) or to be kept (if KEEP is activated).
Keywords
KEEP
Specify that the given liste concern elements of STRU to be kept.
DELETE
Specify that the given liste concern elements of STRU to be deleted.
This keyword is activated by default.
Examples
IDL> extra=get_extra(/ok, year=1999, age_capitaine=35 )
IDL> help, extra,/struct
** Structure <83e66bc>, 3 tags, length=6, refs=1:
AGE_CAPITAINE INT 35
OK INT 1
YEAR INT 1999
IDL> help, extractstru(extra,['ok','hhuihi','YEAR']),/stru
** Structure <831afac>, 1 tags, length=2, refs=1:
AGE_CAPITAINE INT 35
IDL> help, extractstru(extra,['ok','hhuihi','YEAR'],/keep),/stru
** Structure <834bbc4>, 2 tags, length=4, refs=1:
OK INT 1
YEAR INT 1999
Version history
Version
$Id: extractstru.pro 327 2007-12-13 16:22:35Z pinsard $
History
Sebastien Masson (smasson@lodyc.jussieu.fr)
8/10/1999
Produced by IDLdoc 2.0.