Re: deleting structures? [message #10857] |
Fri, 13 February 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Daniel Williams (williams@idunn.srl.caltech.edu) writes:
> Is there any way to delete a structure type?
There is no way in IDL to delete a NAMED structure definition.
For the same reason that you can't change a COMMON block
definition: i.e., memory has been set aside and you don't want
to overwrite it.
> When developing code, it
> is incredibly annoying to have to quit and restart an IDL session
> every time I decide that I need to modify a structure.
Indeed. That is why when you are developing code it is a good
idea to use ANONYMOUS structure definitions. You can change
these as often as you like. When you get the code debugged
and you think you are finished with it, and there is some
*reason* to use a NAMED structure, then add a name to the
structure and off you go.
An ANONYMOUS structure definition:
a = FltArr(10)
b = 5
struct = {A:a, B:b}
A NAMED structure definition:
a = FltArr(10)
b = 5
struct = {MYSTRUCT, A:a, B:b}
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|