Colin
Is it possibly something to do with the precision of your real numbers,
i.e. how many significant decimal places? e.g. one may = 13.11111 and
the other 13.11112 - not equal, but only displaying 1 dec place will
suggest they're the same. If you use the ROUND() function on both vals,
to ensure they're truncated to the same no. sig figs do you still get
the problem?
HTH
Terry McDonnell
-----Original Message-----
All,
I think I may have come across a bug, that or my coding is seriously
suspect! I am trying to evaluate two float variables in an IF statement.
If the two values are the same then I want to perform some operations.
The code is:
If (fDistCheck = fDistLink) Then
'* Perform some stuff here
End If
This statement is working for all values when it is run, the purpose is
to find a link distance that is equalt to the checking value. Printing
out the values shows me that when the two are the same the operations
inside the if statement occur - except when both values are equal to
13.1! When the two values equal 13.1 the IF statement does not evaluate
to true and my app goes into an eternal loop.
What is going on? Has anyone come across this situation before?
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 13740