Re: Most Common IDL Programming Errors [message #59810 is a reply to message #59751] |
Wed, 09 April 2008 19:56   |
Andrew Cool
Messages: 219 Registered: January 1996
|
Senior Member |
|
|
On Apr 9, 11:27 am, David Fanning <n...@dfanning.com> wrote:
> Andrew Cool writes:
>> 1. Indexing FOR loops with a float
>
> I think you missed the word "common", Andrew. :-)
>
> I don't even know what this problem is. Can you elaborate?
>
for i = 0.0,10.000,0.1 do begin
print,i
end
C'mon David, If you've written about the limitations in representation
of floating point variables,
you've writen about it a hundred times in the past 20 years...
The loop above doesn't ever get to 10.000, under Windows at least.
May I refer you to your posts of the previous Millennium on Dec 1,
2000, under
"How Computers Represent Floats"
It's right after your post on "The Joy of Common Blocks", and
immediately before "Fun with VMS." ;-)
Andrew
> 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.")
|
|
|