Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

10. The Language Reference > For . . . Next Statement

Name

For . . . Next Statement

Syntax

For counter = initial_value To maximum_value [Step stepcounter]
                     
                  code to execute on each iteration
   [Exit For]
Next
counter

Use: Required

Data Type: Numeric

A variable to be used as the loop counter.

initial_value

Use: Required

Data Type: Numeric

Any valid numeric expression that specifies the loop counter’s initial value.

maximum_value

Use: Required

Data Type: Numeric

Any valid numeric expression that specifies the loop counter’s maximum value.

stepcounter

Use: Optional (required if Step used)

Data Type: Numeric

Any valid numeric expression that indicates how much the loop counter should be incremented with each new iteration of the loop.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint