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

Home » Public Forums » archive » about 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
about structures [message #86101] Thu, 03 October 2013 08:54 Go to next message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hi guys,

If I create a structure like this:
IDL> a={lolo, a:0, b:''}

Is there a way to change the definition of the defined structure lolo?
What I mean is that, pe, I can do:
IDL> b={lolo}
IDL> help, b, /str
** Structure LOLO, 2 tags, length=24, data length=18:
A INT 0
B STRING ''

But what I cannot do is:
IDL> delvar, a
IDL> delvar, b
IDL> c={lolo, a:intarr(2), b:strarr(2)}
% Conflicting data structures: <INT Array[2]>,LOLO.
% Execution halted at: $MAIN$

I know that the definition of the structure lolo is stored somewhere and apparently it cannot be modified. If you know a way to re-define the contents of a previous created structure, please let me know...

Another thing; I do know that using "anonymous" structures I will not have this kind of problems.
I am just curios to see if this is possible...

Thank you in advance,
nata
Re: about structures [message #86102 is a reply to message #86101] Thu, 03 October 2013 09:10 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
nata writes:

> If I create a structure like this:
> IDL> a={lolo, a:0, b:''}
>
> Is there a way to change the definition of the defined structure lolo?
> What I mean is that, pe, I can do:
> IDL> b={lolo}
> IDL> help, b, /str
> ** Structure LOLO, 2 tags, length=24, data length=18:
> A INT 0
> B STRING ''
>
> But what I cannot do is:
> IDL> delvar, a
> IDL> delvar, b
> IDL> c={lolo, a:intarr(2), b:strarr(2)}
> % Conflicting data structures: <INT Array[2]>,LOLO.
> % Execution halted at: $MAIN$
>
> I know that the definition of the structure lolo is stored somewhere and apparently it cannot be modified. If you know a way to re-define the contents of a previous created structure, please let me know...
>
> Another thing; I do know that using "anonymous" structures I will not have this kind of problems.
> I am just curios to see if this is possible...

Not possible. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How do I change the font of the title in a plot?
Next Topic: How to keep two objects synchronized?

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

Current Time: Wed Oct 08 11:45:45 PDT 2025

Total time taken to generate the page: 0.00443 seconds