To read the article online, visit http://www.4GuysFromRolla.com/webtech/top10/beg2.shtml

Use Option Explicit!


  • Back to Beginner's Tip Index
  • Next tip...

    At the top of your ASP page, you can insert the statement:

    Option Explicit

    By inserting this code, you are telling the ASP parsing engine that you want to explicitly declare all your variables (via a Dim statement). This is good! :) Using Option Explicit allows you to easily catch misspelled variable names.

    It also makes your code more readable. You won't come across a variable name that apparently popped out of thin air. Rather, all variables in the code will have been declared before they are used!

    There's a good article about using Option Explicit already on 4Guys!

  • Option Explicit: Use It!

  • Back to Beginner's Tip Index
  • Next tip...


  • Article Information
    Article Title: ASP Tips: Use Option Explicit!
    Article Author: Scott Mitchell
    Article URL: http://www.4GuysFromRolla.com/webtech/top10/beg2.shtml


    Copyright 2017 QuinStreet Inc. All Rights Reserved.
    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers