comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » delete a tagname from a structure?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: delete a tagname from a structure? [message #86037 is a reply to message #86036] Wed, 25 September 2013 07:45 Go to previous message
spluque is currently offline  spluque
Messages: 33
Registered: September 2013
Member
On Wednesday, September 25, 2013 4:33:40 AM UTC-5, ameigs wrote:
> On Friday, August 8, 1997 8:00:00 AM UTC+1, R. Bauer wrote:
>
>> Hi,
>
>>
>
>> I like to remove a tagname from a structure.
>
>>
>
>> Any ideas?
>
>>
>
>>
>
>> --
>
>> R.Bauer
>
>>
>
>> Institut fuer Stratosphaerische Chemie (ICG-1)
>
>> Forschungszentrum Juelich
>
>> email: R.Bauer@fz-juelich.de
>
>
>
> I use the undocumented keyword to CREATE_STRUCT "REMOVE= tag_position". To make it more palatable I use Craig's cmset_op to get the index of the tag(s) as in the procedure below:
>
>
>
> PRO agm_remove_tag, thisstruct, tagnames
>
> ;; first find the indices of the tag names you want to remove
>
> tags = tag_names(thisstruct)
>
> indx = cmset_op(tags, 'AND', STRUPCASE(tagnames), /index, COUNT = count)
>
> IF count NE 0 THEN BEGIN
>
> thisstruct = CREATE_STRUCT(thisstruct, remove = indx)
>
> ENDIF
>
> END

Thanks for these great suggestions.

Seb
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: A newbie question regarding 3D plotting
Next Topic: Does the IDLDE regularly hang for anyone else?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 04:02:40 PDT 2025

Total time taken to generate the page: 1.92129 seconds