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 #80538 is a reply to message #3992] Wed, 20 June 2012 03:21 Go to previous message
Carsten Lechte is currently offline  Carsten Lechte
Messages: 124
Registered: August 2006
Senior Member
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.


chl
[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: Sun Oct 12 07:33:11 PDT 2025

Total time taken to generate the page: 1.59928 seconds