BUG! Erratic for loop behavior
- Posted by Andy Serpa <renegade at earthling.net> Mar 23, 2002
- 501 views
Hello, The output of this loop: ------------------------------ for i = 9.4 to 10.0 by .1 do ? i end for ------------------------------ stops at 10, as expected. The output of this loop: ------------------------------ for i = 31.1 to 34.2 by .1 do ? i end for ------------------------------ stops at 34.1 (!), NOT as expected. The output of this loop: ------------------------------ for i = 131.1 to 134.2 by .1 do ? i end for ------------------------------ stops at 134.2, as expected. The output of this loop: ------------------------------ for i = 60.0 to 64.5 by .1 do ? i end for ------------------------------ stops at 64.4, NOT as expected. I've verified this on exw.exe & ex.exe, as well as translated to C. It looks like an outright bug to me.