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

Home » Public Forums » archive » Re: array of Julian Days
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: array of Julian Days [message #63524 is a reply to message #63521] Wed, 12 November 2008 09:09 Go to previous messageGo to previous message
Wasit.Weather is currently offline  Wasit.Weather
Messages: 62
Registered: February 2008
Member
On Nov 12, 9:37 am, David Fanning <n...@dfanning.com> wrote:
> Bulrush writes:
>> With the while loop, I got only 8 values, each increased just +1, e.g.
>> 264,265,266... even if I set the step as 8. And become dead loop,
>> looping all the day non-stop for that the same 8 values.
>
> Your while loop ran all day long because you never
> changed the conditional variable. Thus, it started
> true and it remained true. (It's probably still true
> now!)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Here is the updated code. How can I stop then. Why the days are not
increasing steps of 8, and just increasing with an increment of 1?
JDays = LINDGEN(366)
Daystep = 265
; collect the days

WHILE Daystep LE 363 Do Begin
arr = WHERE((JDays LE Daystep+8) AND (JDays GT Daystep),
count)
IF count GT 0 THEN Days = JDays[arr] ELSE days = [-1]
print, days
ENDWHILE
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: convert 003 and 033 to strings
Next Topic: Workbench: Run idl several times

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

Current Time: Sun Oct 12 02:47:52 PDT 2025

Total time taken to generate the page: 2.32219 seconds