Math issue, isn't it?

Scott Rossi scott at tactilemedia.com
Fri May 8 17:11:06 EDT 2009


Recently, Bob Sneidar wrote:

> Then the question becomes, should the IDE be doing math on the real
> number or the displayed number? I vote for the displayed number
> because that means I can have some kind of control over the outcome.
> Clearly if some calculation that comes up with a number cannot be
> compared to a literal for equal/not equal, then all accounting is out
> the window. This cannot be an intended behavior!!?!

As others have said, the issue arises due to the decimal values -- if
integers are used, the comparison works "correctly" (and I'd prefer not to
argue over what is "correct").  I don't know if this is an acceptable
solution but when I use the value function, I get the expected result:

  put value(283.67 - 150 - 133.67) = 0

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design





More information about the use-livecode mailing list