Hi,
try to run this code:
and notice that VB doesn't assume that a is equal to b,
can anyone explain why? regards,
Bruno Loureiro.
try to run this code:
Code:
'------------------------------------------
Private Sub Form_Load()
Dim a As Double
Dim b As Double
a = 6.3
b = 1.1 + 2.1 + 3.1
Debug.Print "a = " & a 'a = 6,3
Debug.Print "b = " & b 'b = 6,3
Debug.Print "a = b : " & CBool(a = b) 'a = b : False
Debug.Print "a - b = " & a - b
'a-b= -8,88178419700125E-16
End Sub
'------------------------------------------
can anyone explain why? regards,
Bruno Loureiro.