View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
heev heev is offline
external usenet poster
 
Posts: 1
Default loop using double

I have the following sub.

Sub test()
Dim i As Double
Dim j As Double

j = 0.2
For i = -3 To 3 Step j
Debug.Assert i < 3
Debug.Print i
Next
End Sub

If I run this code the last step 3 will not run.
If I modify I to 2.5 it does. What's going on?