1

Go to the immediate window in Visual Basic 6 and type

?(2.42+0.58)=3.00

This statement returns True as you'd expect

But this returns False!

?(2.42+0.57)=2.99

Note, it seems to be related to Double numerical types, if converted to another type its ok, eg

?CCur(2.42+0.57)=2.99

Why ??! Is this a bug in the VB compiler?

userSteve
  • 1,554
  • 1
  • 22
  • 34

0 Answers0