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

For a webbased application:- what should be code in expert veiw, for retrieving a single column name "username" from a server and checking whether exported "username" from datatable doesn't exist in server. suppose i have saved in excelsheet a username="gayatri" , which is exported, then checked for whether this username "gayatri" exist in server database or not ? if exist then allow to enter new username, which should be again checked for in loop , or else come out of loop and enter a distinct "username". plz let me have this answer in my id gayatrisahooin@hotmail.com

1753


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

1493


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

517


Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)

1409


about vb scripting programs this type of all question& answers

1693






does anyone have qtp11.0 license key.Please sendit to my mail id-rrvv2011@gmail.com...Thanks

2504


Mention what is the main difference between function and sub-procedure?

549


what is the standards used for writing the script in QTP

1892


Give me sm ideas to write Vbscripts abt protocol testing abilash700@gmail.com.

1588


How to pass argument by reference to a function in vbscript?

536


How will you check that a variable is an array in vbscript?

544


Which data type/types are supported by vbscript language and what are their specialties?

596


Which object is used to work with the database in the vbscript language and what statement is used to create this object?

510


what is the difference between modular and data and keyword driven framework

1740


Explain the string concatenation function in vbscript?

543