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

Home » Public Forums » archive » determining if a structure has a given tag
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
determining if a structure has a given tag [message #66942] Tue, 16 June 2009 21:25
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
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.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL 7.1 workbench: auto text match?
Next Topic: IDL 7.1 - importing of project fails

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

Current Time: Wed Oct 08 19:55:25 PDT 2025

Total time taken to generate the page: 0.00547 seconds