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 #63606 is a reply to message #63521] Thu, 13 November 2008 01:32 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning schrieb:
> Bulrush writes:
>
>> On Nov 12, 9:37=A0am, 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!)
>> 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 =D WHERE((JDays LE Daystep+8) AND (JDays GT Daystep),count)
>> IF count GT 0 THEN Days =JDays[arr] ELSE days = [-1]
>> print, days
>> ENDWHILE
>
> You can stop it by making the control variable "daystep"
> greater than 363. You don't change it's value anywhere
> in this loop, so it *stays* less than 363 forever and ever.
>
> If you put a breakpoint in your code and step through this
> a couple of times, I think eventually you will discover the
> problem. :-)

Wasn't that the initial idea two days before ?

I think we should also establish a while loop for you doing our
suggestion. We know you can't escape from that loop ;)


Reimar
[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 14:52:26 PDT 2025

Total time taken to generate the page: 0.79836 seconds