-
Nov 4th, 2002, 10:40 PM
#1
Thread Starter
Junior Member
Comparison of Double values
I encounter a strange problem when comparing
two double numbers. The code is below and it
gave me "1.4>1.4"! Anything speical for such
simple comparison?
Thanks.
----------------------------------------------------------
Dim aa1 As Double
Dim aa2 As Double
Dim bb As Double
Dim aa As Double
aa1 = 1.36
aa2 = 0.04
aa = aa1 + aa2
bb = 1.4
If aa > bb Then
MsgBox aa & ">" & bb
ElseIf aa = bb Then
MsgBox aa & "=" & bb
Else
MsgBox aa & "<" & bb
End If
----------------------------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|