D
David
hello.
when doing the simple following computation, the value put into the variable
numMinusOne is NOT the same as what the computation is showed to be in the
Watch window!!
here is the code:
Dim xSng As Single = 6547.972
Dim yInt As Integer = 8000
Dim num As Integer = CInt(Math.Floor(xSng * yInt))
Dim numMinusOne As Integer = CInt(Math.Floor(xSng * yInt) - 1)
After running these 4 lines, numMinusOne will be:52383776
while the Watch window will claim that the value of :
CInt(Math.Floor(xSng * yInt) - 1) = 52383775
BTW, the Watch window is correct.
how come the numMinusOne does not get the correct value?
when doing the simple following computation, the value put into the variable
numMinusOne is NOT the same as what the computation is showed to be in the
Watch window!!
here is the code:
Dim xSng As Single = 6547.972
Dim yInt As Integer = 8000
Dim num As Integer = CInt(Math.Floor(xSng * yInt))
Dim numMinusOne As Integer = CInt(Math.Floor(xSng * yInt) - 1)
After running these 4 lines, numMinusOne will be:52383776
while the Watch window will claim that the value of :
CInt(Math.Floor(xSng * yInt) - 1) = 52383775
BTW, the Watch window is correct.
how come the numMinusOne does not get the correct value?