Re: resetting structs [message #12250 is a reply to message #12242] |
Fri, 24 July 1998 00:00   |
Vap User
Messages: 31 Registered: April 1998
|
Member |
|
|
don shad <dschad@frontiernet.net> writes:
You can't redefine a named structure within one session of IDL. Once
you define it, it's fixed for that session. You must exit IDL (or
IDLDE in your case), start up another session, then redefine. You see
the error when you attempt to actually execute the code contained in
the junk__define.pro or try to execute it's equivalent at the command
line. There is no compilation error because it is not an error to
compile a module that defines a structure different from the one you
currently have defined, only to execute that module. Since you seem to
be working with Objects, which require a named structure, you're out
of luck.
The rule of thumb is, avoid named structures unless you really need
them. Working with Objects is a case of the latter.
whd
>
> hi,
>
> (it has been a long road just getting a message to
> post to the news group).
>
> how does one re-declare a struct in the IDLDE? if i
> create
>
> struct = {junk, data:0}
>
> but later decide that i want to do
>
> struct = { junk, mydata:0 }
>
> i either get an error (if in the ide commandline), or
> if i do this in a "junk__define.pro" and use a ".compile
> junk__define.pro", i get no change in my structure.
> this has caused no end of pain for me.
>
> i have been unable to find any help from either the FAW
> or the documentation on this problem (^R doesn't do it
> either).
>
> any help would be much appreciated.
>
> thanks very much,
>
> don schad
> hydroqual.com
> -------------------------------------------------------
> Brought to you sloooooooowly by Frontier Communications,
> the Intermittent Service Provider.
--
I don't speak for JPL, it doesn't speak for me.
Well, not all the time, at least.
William Daffer <vapuser@haifung.jpl.nasa.gov>
|
|
|