Browse DevX
Sign up for e-mail newsletters from DevX

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



Building the Right Environment to Support AI, Machine Learning and Deep Learning

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.



Thanks for your registration, follow us on our social networks to keep up-to-date