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

Home » Public Forums » archive » Re: deleting structures?
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
Re: deleting structures? [message #10857] Fri, 13 February 1998 00:00
davidf is currently offline  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/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: calculating an 3d array from N-BODY data
Next Topic: deleting structures?

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

Current Time: Fri Oct 10 05:51:36 PDT 2025

Total time taken to generate the page: 2.16195 seconds