dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Web
Expertise: Beginner
Oct 18, 1999

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Always Use Option Explicit

You should always use Option Explicit statement in your .asp file. This statement will enforce that you explicitly declare all the variables in the script. The whole problem: VBScript allows you to use variables without explicitly declaring them. Turning on this option helps you in identifying undefined variables.
The Option Explicit statement must appear in a script before any procedures. When you use the Option Explicit statement, you must explicitly declare all variables using the Dim, Private, Public, or ReDim statements. If you try to use an undeclared variable name, an error occurs. Using Option Explicit makes undeclared local variables illegal. Undeclared local variables are as slow as global variables. Another added advantage of using this statement is that you move towards a more maintainable code as all the variables are declared before usage.
Deepak Pant
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
×
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date