What is the use of "Option Explicit"?

Answer Posted / bharathchandra m

"Option Explicit" statement is used to declare variables and
arrays on the top of the script.When this stmt in script ,QTP
can allows all variables used in that script without
returning any error.

For example: x= 10
y= 20
z= c*y
msgbox(z)
In the above code, by mistakenly typed as 'c' in the place
of 'x'. Bur QTP tool allows 'c' as a new variable without
returning error.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......

1489


How will you release the memory acquired by an array variable in vbscript?

742


Explain some uses of vb script?

551


How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.

2574


Explain the asc function?

508






Can anyone send me a vb script function for verifying the functionality of active links on a web page

1596


Explain about tristate constants?

583


By default in vbscript the arguments passed to functions and subroutines are by reference or by value?

620


how to operate webobjects in a webpage using getobject function and then using generic methods?

2542


Which command is used for writing text on a page?

574


If else for do while select in vb script?

640


Which in-built function related to an array joins substrings into one string in the vbscript language?

512


Set srchobj=Description.Create() srchobj("type").value="text" srchobj("name").value="q" srchobj("html tag").value="input" browser("micclass:=google").Page("micclass:=google").webedit (srchobj).Set "qtp" what's wrong in my code pls tell me ? the above code working fine and i got my result pass,now i am trying to run the program it shows general run time error why?pls help me i am in learning stage ?

1550


What is the main difference between function and sub-procedure?

549


Write a Script for ATM in QTP

3337