STATEMENT: FOR
FOR . . . NEXT
The FOR conditional statement repeats a block of code a specified number
of times.
You must end all FOR statements with NEXT or you will get an error message.
You can place FOR statements inside of other conditional statements. You
can use EXIT FOR statements to exit out of a FOR loop. The keyword STEP
allows you to loop through a FOR statement in any size of increment.
Code:
<%
FOR i = 1 To 100
REM You can place all of the code you desire inside a FOR
loop
NEXT
%>
<%
FOR k = 100 To 1 STEP -1
REM You can place all of the code you desire inside a FOR
loop
NEXT
%>
<%
FOR mynum = 200 To 200000 STEP 200
REM You can place all of the code you desire inside a FOR
loop
NEXT
%>
Copyright 1999 by Infinite Software Solutions, Inc.
Trademark Information