For Next
The For Next control statements create a iterative
block of code. This means they execute the same code
statements 0 or more times repetitively. How many times this loop repeats depends on the starting value, ending value and increment value of the counter.
The counter keeps track of where you are in the loop (how
many times the loop has been executed) and may start counting
from any number and end at any number. Additionally, the increment
to advance the counter after each successive pass through the loop
is also adjustable.
Dim I
' let's count to 10
For I = 1 To 10 Response.Write CStr(I) & vbCrLf Next
' let's count to 10 backwards
For I = 10 To 1 Step -1 Response.Write CStr(I) & vbCrLf Next
' let's count to 1 the hard way
For I = 0 To 1 Step 0.1 Response.Write CStr(I) & vbCrLf Next
|
 |

|