BrainDump
  Home arrow BrainDump arrow Looping Statements in VBScript
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

Looping Statements in VBScript
By: Nilpo
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 5
    2007-12-11

    Table of Contents:
  • Looping Statements in VBScript
  • Incremental Loops
  • Conditional Loops
  • More On Loops

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Looping Statements in VBScript


    (Page 1 of 4 )

    As you begin to create more complex scripts with VBScript you will develop the need to repeat sections of your code in order to repeat some actions. Looping statements provide a device for repeating code segments.

    VBScript provides several different looping statements that can be divided into two categories based on the way in which the loop is constructed: incremental loops and conditional loops.

    Incremental loops are used to repeat code a definite number of times.  The number of iterations is determined at the time the loop is created.  This type of loop could be used to repeat a calculation a specific number of times or to move through each of the contents in an array since each of these would be repeated a definite number of times.

    Conditional loops are used to repeat code based on the value of some conditional statement.  In other words, the code would be repeated for as long as a specified condition is true or false.  Looping will continue until that condition changes.  This allows you to repeat code an indefinite number of times.

    Looping structures are not to be confused with methods such as subroutines or functions. These alternate methods of repeating code are designed to allow code to be reused without looping.  Viewing examples of both will make the separation between the two that much clearer.

    More complex looping structures can be created by combining conditional loops and nesting multiple loops.  As you become more familiar with looping structures and more experienced in their implementation, you will begin to see how these complex loops can be beneficial.

    More BrainDump Articles
    More By Nilpo


     

    BRAINDUMP ARTICLES

    - Introduction to Office Live Workspace
    - Using MS Excel for One-way Analysis of Varia...
    - Comparing Data Sets Using Statistical Analys...
    - Import Blogger Posts into WordPress Using Wi...
    - Download WordPress from an FTP Server and Ru...
    - Install and Run WordPress in XAMPP Local Host
    - What Windows 7 Brings to the Table
    - Virtualization and Sandbox Detection
    - Advanced Firebug Techniques in Windows XP Ho...
    - Editing CSS with Firebug in Windows XP Home
    - Using Firebug in Windows XP Home
    - Migrating to Exchange Server 2007
    - Using System Restore on a Non-Bootable PC
    - Finding Logged on Users and More Scripting S...
    - Developing Macro Commands in MS Excel





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT