C
Clive Tolley
I have just debugged various errors in a program for Word as due to VBA's
apparent inability to perform simple arithmetic. A simple piece of code such
as:
Dim s As Single
s = 0.05
For i = 1 To 240
s = s + 0.1
MsgBox s
Next i
produces errors on about a third the numbers generated (and the number type
seems to make no difference - same with Double, anyway).
What is going on?
apparent inability to perform simple arithmetic. A simple piece of code such
as:
Dim s As Single
s = 0.05
For i = 1 To 240
s = s + 0.1
MsgBox s
Next i
produces errors on about a third the numbers generated (and the number type
seems to make no difference - same with Double, anyway).
What is going on?