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

Home » Public Forums » archive » Re: Having trouble stopping a loop (or loop de loop de loop)
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: Having trouble stopping a loop (or loop de loop de loop) [message #62160 is a reply to message #62159] Mon, 25 August 2008 21:58 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
David Fanning wrote:
> And, second, I don't think in 25+ years of computer programming I have
> ever used a floating point loop counter. I didn't even know it was
> possible. If it *is* possible, then I envision havoc, simply by
> virtue of the way floats can (or, more to the point, cannot) be
> represented on computers. (I could easily be wrong about this,
> but I'm just saying I've never found a reason for it, so I have
> never tried it. There must be a significant difference in how
> you and I think about loops.)

You can use a floating point counter and it is a problem:

IDL> for i = 0.0, 1.0, 0.1 do j = i
IDL> print, j
0.900000
IDL> print, j, format='(F20.15)'
0.900000095367432

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Matching Lats and Lons from two arrays
Next Topic: Re: heap_free fatal error

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

Current Time: Fri Oct 10 02:27:04 PDT 2025

Total time taken to generate the page: 0.80389 seconds