GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Testing Tools  >  QTP
Go To First  |  Previous Question  |  Next Question 
 QTP  |  Question 663 of 677    Print  
Declaring variables
What is the difference if we use Dim to declare a variable and one without declaring it.


  
Total Answers and Comments: 1 Last Update: July 29, 2008     Asked by: mabobine 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
July 29, 2008 06:00:07   #1  
akothuru Member Since: April 2008   Contribution: 37    

RE: Declaring variables
"Dim" keyword is related to VB Script. There is no difference if you do not declare the variables with/with out declaration where your script does not have the statement "Option Explicit"

"Option Explicit" is keyword which can be used in VB Script to declare a variable. If you specify Option Explicit in you script, what ever the variable you are using in your script should be declared before accessing it. Otherwise it gives the syntax error so that you can't execute the script at all. So here, you should use "Dim" keyword to declare varialbes.

Using Dim, user can declare variables. When you declare a variable, it acts as Variant. No memory is allocated in RAM for that variable at the time of declaration. Based on the value assign to it, that bytes of memory will be allocated to this variable at run time.

 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : Builtin, User-defined internal  and  User-defined these are the 3 types of environment  var in qtp. environment var action like global variables.sudhakar kolla,My email:kollasudhakar2005@yahoo.co.in.My number:09819859346 ...
Read Answers (8) | Asked by : sonu

Can any one pls tell me about how to configure the environment variables in qtp and how to use the variables, with example:
Read Answers (6) | Asked by : Sats

Latest Answer : Either we can write a vbs for global variables or Create environment variables [user defined variabled] which can used across various tests. ...

Latest Answer : we have two types of Environment variables in QTP:1. Builtin Environment Variables(also called system defined variables)2. User defined Environmental Variables (these are Two types Again)  a. User defined Internal Variables  b. Userdefined External ...
Read Answers (2) | Asked by : lakshmareddy

What is the difference if we use Dim to declare a variable and one without declaring it. 
Latest Answer : "Dim" keyword is related to VB Script. There is no difference if you do not declare the variables with/with out declaration where your script does not have the statement "Option Explicit""Option Explicit" is ...
Read Answers (1) | Asked by : mabobine


 Sponsored Links

 
Related Articles

ODP.NET - Working with Bind Variables together with OracleParameter

ODP NET Working with Bind Variables together with OracleParameter With the help of OracleParameter you can include bind variables within any SQL statement These bind variables are nothing but run time query parameters The values in the SQL statement are bound at run time when we use bind variables m
 

SQA Software and Tools

SQA Software and Tools In quality assurance it is always important to get all the help we could get In other industries developers could easily check the products manually and discard those that do not meet the standard The length and the width of the product are checked to maintain standardization
 

Microsoft AJAX Library - Functions as Variables

Functions as Variables In JavaScript functions are first class objects This means that a function is regarded as a data type whose values can be saved in local variables passed as parameters and so on For example when defining a function you can assign it to a variable and then call the function thr
 

Business Network Virtual Communication Tools

Business Network Virtual Communication Tools Since ages the Business community heavily relied on face to face communication for building Business relationships Face to face communications formed the basis for trust in a relationship An individual’ s appearance or the physical appearance of
 

What are Data Access Tools

Data access is the process of entering a database to store or retrieve data. Data Access Tools are end user oriented tools that allow users to build structured query language (SQL) queries by pointing and clicking on the list of table and fields in the data warehouse. Thorough computing history, t
 

Swap two variables

How to swap two variables without using third variable? A variable is a named location in memory that is used to store data which can be modified in a program. Let us learn how to swap two variables without using third variable. This can be done in number of ways By using arithmetic operators
 

Testing and Integration

Once the software is complete, it will go though rigorous testing before its actual integration.  In this article we will take a look at different types of software testing and also different types of integration. With the diversity of business setting and software development models, it al
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

SAP and Microsoft tools for Customer Service

World’s largest car dealer to use SAP and Microsoft tools for Customer Service Inchcape, the London-based largest car dealer in the world, is making itself much strong now by improving its customer services arising from major SAP and Microsoft implementations. The company has also vowed to
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape