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

Home » Public Forums » archive » Re: determining if a structure has a given tag
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: determining if a structure has a given tag [message #66937 is a reply to message #66918] Wed, 17 June 2009 05:09 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Jeremy Bailin schrieb:
> I'm sure there is a simple answer to this, but I can't find it.
>
> Does someone know of a programmatic way to determine if a given tag is
> defined in a structure, without resorting to TAG_NAMES (which seems
> downright ugly). I can do something like
>
> if n_elements(variable) eq 0
>
> to determine if a variable has been defined, but to figure out if a
> structure tag is defined I need to grab a list of all tags?? I guess I
> want something that's functionally equivalent to:
>
> if total(tag_names(struct) eq strupcase(tag)) gt 0
>
> but which doesn't make me shudder. The closest discussion I can find
> on this is here:
> http://groups.google.com/group/comp.lang.idl-pvwave/browse_t hread/thread/2f2c38c0e9f0ee63/97dd066b2cc7af82?lnk=gst&q =structure+tag+defined#97dd066b2cc7af82
> ...but most of that focuses on the peculiarities of dealing with
> _EXTRA, not the more generic case.
>
> -Jeremy.



Result=is_tag(structure,tagname)

http://www.fz-juelich.de/icg/icg-1/idl_icglib/idl_source/idl _html/dbase/is_tag_dbase.pro.html

cheers
Reimar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Map Projection Conversion in ENVI
Next Topic: Re: POLAR_CONTOUR plot giving strange values for contour lines

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

Current Time: Fri Oct 10 11:05:49 PDT 2025

Total time taken to generate the page: 0.48516 seconds