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

Home » Public Forums » archive » Re: change values of structure variable
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: change values of structure variable [message #81955 is a reply to message #81953] Tue, 06 November 2012 07:23 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
sid writes:

> Please help in changing values stored in structure variable.
> What I tried is,
>
> IDL> help,/str,atmos
> ** Structure <911e87c>, 11 tags, length=22780, data length=22780, refs=1:
> NHYDR LONG 6
> NELEM LONG 99
> MOVING LONG 0
> T DOUBLE Array[3, 82]
> N_ELEC DOUBLE Array[3, 82]
> VTURB DOUBLE Array[3, 82]
> NH DOUBLE Array[3, 82, 6]
> ID STRING 'FALC_03x82.atmos (Tue Nov 6 10:32:22 2012'...
> ELEMENTS STRUCT -> <Anonymous> Array[99]
> BACKGRFLAGS STRUCT -> <Anonymous> Array[284]
> BACKGRRECNO LONG Array[284]
>
> Here I want to change the values of VTURB to 2500.0000
> SO I did,
> IDL> atmos.vturb(*,*)=2500.0000
> now temporarily it changes to 2500.0000, This is in a common block. So while running the main program the vturb value goes back to the original value instead of the changed 2500.0000.
>
> Please help me in changing the value.

You can't change anything about a structure once you create
it in the IDL session. If you have a field that is changing,
as this one is, you should make that field a pointer to the
value you want to store there.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: attractive base map for animation
Next Topic: Re: Save some plots

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

Current Time: Thu Oct 09 21:06:19 PDT 2025

Total time taken to generate the page: 0.72104 seconds