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

Home » Public Forums » archive » Re: crazy loops
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: crazy loops [message #29338] Wed, 13 February 2002 14:11 Go to previous message
Andre Kyme is currently offline  Andre Kyme
Messages: 19
Registered: September 2001
Junior Member
M Carmen wrote:

> Hello,
>
> I have a question related with loops......can someone teel me why
>
> if i do a loop that goes to a maximum of 0.6:
> for r=0.0, 0.6, 0.1 do begin & print, r & endfor
>
> I get:
> 0.000000
> 0.100000
> [........]
> 0.500000
> 0.600000
>
> and if now i change the maximum value of the range to 0.7:
> for r=0.0, 0.7, 0.1 do begin & print, r & endfor
>
> I get:
> 0.000000
> 0.100000
> [........]
> 0.500000
> 0.600000
>
> EXACTLY THE SAME!!!
>
> I have IDL Version 5.4
>
> Thanks :) !
> M Carmen

Hi M Carmen,
I asked this very question not so long ago on this newsgroup (probably
around October/November last year) -
you might want to check out that thread. Basically the answer was "never
use a float as the loop variable."
Also, Jeff Hester probably has some helpful :-) comments to pass on. I
know I was particularly encouraged
and assisted by his replies,

Andre
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to debug a IDL DLM routine
Next Topic: Radar dB values

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

Current Time: Wed Oct 08 18:43:32 PDT 2025

Total time taken to generate the page: 0.00879 seconds