Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

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


Orvado, San Diego Web Design

ASP Nuke CMS
Free Open Source
Content Manager
GoSwap Auctions
Buy, Sell
No Fees!

Contact Us | Contribute | About | Site Map



"All programmers are playwrights and all computers are lousy actors." - Anon

©2012 San Diego Web Design - Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.