Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - When and why do you use "OPTION EXPLICIT" in VB Script?




321
views
asked marvit August 19, 2014 02:03 AM  

When and why do you use "OPTION EXPLICIT" in VB Script?


           

1 Answers



 
answered By Dharma   0  
Use Option Explicit to avoid incorrectly typing the name of
an existing variable or to avoid confusion in code where the
scope of the variable is not clear.

when you use Option Explicit statement,you must explicitly
declare all variables using the Dim,Private,Public or ReDim
statements.If you attempt to use an undeclared variable
name,an error occurs.
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert