Subject: 2 Double numbers, same value not equal in LotusScript?
Because you’re using the wrong operator… = is different than ==…
When comparing 2 values for equality, you must use the equality operator “==”.
When you want to set a variable to a value, you use the = operator.
The correct code should be:
If totalDR == totalCR Then
isTotalDRCROkay = True
Else
isTotalDRCROkay = False
End If
EDIT: Sorry, my mistake… == is the same as = in LotusScript language… Add some debug prompts to your script to confirm the content of each variable… I can’t see why it wouldn’t work from that code…
Subject: 2 Double numbers, same value not equal in LotusScript?
It is almost certainly that they are not really equal, but just equal enough to the level of precision you are showing. For example 3000.279999999998 and 3000.28000000000001 may both show up as 3000.28 depending on the level of precision you are showing, but that doesn’t make them equal. I think there is an @function in 6.5.1 that checks to within a level of precision, but I don’t recall what it is.