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

Home » Public Forums » archive » Re: Can an object's structure be redifined without restarting IDL
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: Can an object's structure be redifined without restarting IDL [message #16134] Fri, 02 July 1999 00:00 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Frank Morgan wrote:
> If you're working interactively at top-level you can delete the structure
> and recreate it from scratch with new fields - like:
>
> x = {a:0, b:2.0}
> delvar, x
> x = {a:0, b:2.0, c:5.2}
>
> This avoids the data structure conflict. You can't use delvar in procedures
> though.

Because X is an anonymous structure,

x = {a:0, b:2.0}
x = {a:0, b:2.0, c:5.2}

will work just as well, and does not require DELVAR. You can redefine an
anonymous structure on the command line, or in a procedure, function, or
script.

Named structures however cannot be redefined; their definition is fixed
until the end of the IDL session. For example, the second statement
below is not allowed:

y = {TEST, a:0, b:2.0}
y = {TEST, a:0, b:2.0, c:5.2}

Cheers,
Liam.

--
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: EVENT_FUNCS
Next Topic: Re: IDL sites on WWW

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

Current Time: Wed Oct 08 15:53:56 PDT 2025

Total time taken to generate the page: 0.00510 seconds