On Jul 27, 2006, at 1:42 PM, [EMAIL PROTECTED] wrote:

Try this code out and you'll see why it is the way it is.
It has everything to do with floating point math in a system based on
binary.

  Thanks for the example.

I can accept the limitations of floating point math, but shouldn't the language and IDE at least be consistant? If you walk through the code line
by line the IDE shows .036, 27 and then magically jumps to 26.

The debugger does show a "nice" representation of the value

Shouldn't the IDE be showing the "real" values, which in RB's case would be .035999999997, 26.9999999 and 26. This would create a lot less confusion. Another example is the str() command. It converts d to "27", if d is really
26.9999, then str() should convert d to 26.99999.

Depends on what version of RB you are using.
There have been some subtle changes in the way those functions worked and in how the debugger shows values.
I NEVER use STR and always use format. It gives you much more control.

In a situation like that you would be able to change the format and see what's going on.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to