Customer Login  .   Webmail Login  .   About Us  .   Contact Us
Go to: Articles List

Using the Exit statement

     Using the Exit statement you can force the flow of your program to exit the current set of logic it is in. An example of when you might want to do this is when you have a few nested if statements. Once you are in the if statements you check a certain condition and find it to be false. At this point you want to flow of your program to exit out of the current sub routine. With the Exit statement you can do this.

Syntax:

Exit LogicToExit

LogicToExit can be Do, For, Sub, or Function.

Example:

For i = 1 to 50
     If i = 10 Then
         Response.Write("Exiting For loop...")
         Exit For
     End If
Next

Result:
This code will loop through until i equals 10, then it will print "Exiting For loop..." and exit the loop.

Shared Hosting
Rookie
Pro
Advanced
Dedicated Servers
BASE
BUSINESS
ENTERPRISE
Why Choose Brinkster?
Radical Support
Brinkster Datacenter
Brinkster Network
Corporate Social Responsibility
90 Day Money Back Guarantee
Unsurpassed Value
Client Testimonials
Additional Features
Antivirus
Merchant Account
E-Commerce
Live Chat Communicator
Free Firewall
Website Builder
Free Web Hosting
Support
General Support
Codebank Search
Forums
Articles
Click here for Brinkster Live Chat
Home   Domains   Shared Hosting   Dedicated Hosting   Partner   Support   About Us    Contact Us   Webmail
Copyright © Brinkster Communications Corporation All Rights Reserved. Privacy Policy & Legal