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 / ritesh mahendrakar

You can declare variables with the Dim, Public or the
Private statement. Like this:

Dim myname
myname = "ritesh"

However, this method is not a good practice, because you
can misspell the variable name later in your script, and
that can cause strange results when your script is running.

If you misspell for example the "myname" variable
to "mynime", the script will automatically create a new
variable called "mynime". To prevent your script from doing
this, you can use the 'Option Explicit' statement. This
statement forces you to declare all your variables with the
dim, public or private statement.

Put the Option Explicit statement on the top of your
script. Like this:

Option Explicit
Dim myname
myname = "ritesh"

Is This Answer Correct ?    16 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can u please explain what is the exact difference between qtp8.2 and 9.0

2156


Should have experience in framework means?

1872


How to capture a window in QTP?

1958


What is ObjectParamater?

1986


For which type of projects the iterative model is not suitable?

1872


What is the difference between a Function and Action in QTP?

1078


To retrive the test data which tool vl use and whats basis u vl write test data? its urgent

1898


tell me abt a time when u had to go above &beyind the call of duty to get the job done

1921


What is the extension of the qtp local repository?

1053


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))

1997


How do know the number of browsers opened?

1068


Explain how qtp identifies objects?

981


How do you know the location Id of an object if you know its index id?

1031


What is the expert view?

980


when I was doing the web testing with QTP using with standard checkpoint the Object selection -checkpoint properties dialog box not displaying pages and links hierarchical order. Could you please tell me. thanks

2257