It's only a minor detail, but why does the “Step” parameter have to be specified explicitly for downward counting >For loops< and not for upward counting >For loops<?
If “For i = 10 To 0” automatically used a step of -1 in the same way that “For i = 0 To 10” uses a step of 1, it would be more logical.
Code: Select all
Debug "upward ----------"
For i = 0 To 10
Debug Str(i)
Next i
Debug "downward --------"
For i = 10 To 0
Debug Str(i)
Next i
Code: Select all
[22:03:46] [Debug] upward ----------
[22:03:46] [Debug] 0
[22:03:46] [Debug] 1
[22:03:46] [Debug] 2
[22:03:46] [Debug] 3
[22:03:46] [Debug] 4
[22:03:46] [Debug] 5
[22:03:46] [Debug] 6
[22:03:46] [Debug] 7
[22:03:46] [Debug] 8
[22:03:46] [Debug] 9
[22:03:46] [Debug] 10
[22:03:46] [Debug] downward --------
But as I said, it's nitpicking... but there are some situations where you first look for the “error” elsewhere instead of in the For loop.