A string doesn't equal itself
Richard Gaskin
ambassador at fourthworld.com
Thu Apr 12 13:51:17 EDT 2007
J. Landman Gay wrote:
> Not to beat a dead horse or anything, but Mark Waddingham has just
> commented on the bug I submitted for this. He verifies what we've been
> discussing -- it's an overflow problem due to interpreting the string as
> a number -- and says he thinks its a bug. It is targeted to be fixed for
> the next dp release.
>
> The fix involves doing a string comparison rather then a numeric
> comparison if either operand overflows. The bug number is 4651 if anyone
> is curious.
The buffer overflow check is a good first move.
Does he also have an opinion about treating string literals as numbers?
I can understand attempting to coerce to numbers if two string literals
have an arithmetic operator between them, e.g.:
"5" + "5"
...but if quoted and merely checking for equivalence, offhand I can
think of no case where these wouldn't be true:
"5" is "5"
"55e555" is "55e555"
"a" = "a"
> BTW, I'm very pleased with how quickly bugs are being addressed these
> days. I've entered a few over the last week or so and they've all been
> attended to promptly. If anyone has an issue that they haven't yet
> entered into the bug database, I'd say now is a great time to do it.
> They're combing through there at a pretty good clip.
Yes indeed. My In Box has been busy processing their update notices as
they knock those off. Good work, Team Rev!
--
Richard Gaskin
Fourth World Media Corporation
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list