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

Home » Public Forums » archive » Structure Creation with Execute
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: Structure creation [message #80537 is a reply to message #3992] Wed, 20 June 2012 04:01 Go to previous messageGo to previous message
John Coxon is currently offline  John Coxon
Messages: 15
Registered: February 2012
Junior Member
On 20/06/2012 11:21, Carsten Lechte wrote:
> On 20/06/12 12:07, John Coxon wrote:
>> Hi there,
>>
>> Having an odd issue with creating structures.
>>
>> idl > med = {avg1, dawnR1:0.0, duskR1:0.0, dawnR2:0.0, duskR2:0.0}
>> idl > print,med.dawnR1
>> 0
>> idl > help,med.dawnR1
>> <Expression> INT = 0
>
> I would guess that you previously defined a structure with name avg1
> that had dawnR1 as an integer. dawnR1's type is determined by the
> initialisiation value from the very first use of the structure. A naked
> "40" or "0" is interpreted by IDL as an integer constant.
>
> Either change to using unnamed structures, or be extra careful when
> specifying values, e.g. always do 1.0 when you want float, 1d0 when you
> want double, 40L for long etc.

I see, that would make sense. Is there any way to clear a structure, for
instance, between two runs of a program?

--
John Coxon
http://www.chickensinenvelopes.net/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Always Something to Worry About
Next Topic: Re: Always Something to Worry About

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

Current Time: Sat Oct 11 16:39:13 PDT 2025

Total time taken to generate the page: 0.64250 seconds