[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: deleting structure element
David Fanning (davidf@dfanning.com) writes:
> Bernard Puc (bpuc@va.aetc.com) writes:
>
> > Is there a neat, clever way to "delete" an element from a structure?
>
> Set its pointer to a NULL object.
>
> Cheers,
>
> David
>
> P.S. Alright, maybe it's not "neat", but I think it
> qualifies as "clever". :-)
On further (and more sober) reflection I would probably
answer like this:
No way, no how, if you have a named structure. If you
have an anonymous structure you *could* (under extreme
duress) simply redefine the structure without the
*&%%$^ field:
struct = { a:0, b:0, c:0}
struct = { a:struct.a, b:struct.b }
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155