Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

When and why do you use "OPTION EXPLICIT" in VB Script.
Is there any online help or something to learn the script
for Beginners?

Answer Posted / pallavi nandula

When you use the 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.

VBScript ingeneral doesn't need variable declaration. For
example without using "Dim" a variable can be directly used
for assigning etc. For ex: temp=1

However, such practise can always be error prone. Ex: if i
want to use the same variable in someother statement and
miss spell it,say

tempe=temp+1

VBScript still considers "tempe" as valid. This case if we
use OPTION EXPLICIT On top of our application and proceed
then application will not proceed unless until u declare
each and every variable. Hence u make sure that ur variable
is serving ur purpose.

in this example u recognize that "tempe" is not desired.
Hope this clarifies.

Is This Answer Correct ?    88 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about the test fusion report of quicktest professional?

929


Can any one explain me what is the procedure to connect the remote desk by using QTP 9.2 ?

1925


what is Property......End Property loop? how to write sript for it in QTP

2371


Hi Friendss..., can any body help me.. 1. Tell me your achievements(Technically)..? 2. Tell me your strengths(Technically) and weakness(Technical)..? 3. Why are you looking for change..?

1813


What is regular expression?

1045


How to use Environment parameterization? Explain with an example.

1962


what is stepin & stepout?

1839


How can I find out the cursor position through QTP suppose I am keep tabbing(Pressing the tab key continuously) and stoped at a position Now I want to find out where the cursor position is

6785


What do you mean by iteration?

1191


Discuss quicktest professional (qtp) environment?

999


Could i know how how to explain keyword driven framework in interview? If any body knows plz send the explanation.

2158


Can anybody post some real time scenario in qtp? please its very urgent.

2278


Suppose you are using shared objects repository in your test and you want to split your present action? At that time shared object repository is single or it’s also splits?

1135


Does Low-level recording capture mouse movements?

1034


What is clean sweep?

1805