ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
What is the difference between Dim And Redim
 Question Submitted By :: Nagireddy.sn
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between Dim And Redim
Answer
# 1
Dim is a data type(variant) that user can assign to a 
variable like Dim User 
User = "QTP"

Redim can be use to reinitialize the variable. We can give 
a new value to the same variable and can use it again in 
the script.

 
Is This Answer Correct ?    12 Yes 4 No
Paayal
 
  Re: What is the difference between Dim And Redim
Answer
# 2
Dim statement is used to formally declare a variable, where 
as ReDim statement is used to resize a dynamic array that 
has already been formally declared.
 
Is This Answer Correct ?    16 Yes 1 No
Ravi_kanakam
 
 
 
  Re: What is the difference between Dim And Redim
Answer
# 3
Dim Statement

Declares variables and allocates storage space.

Dim varname[([subscripts])][, varname[([subscripts])]] . . .

Variables declared with Dim at the script level are 
available to all procedures within the script. At the 
procedure level, variables are available only within the 
procedure. 

You can also use the Dim statement with empty parentheses 
to declare a dynamic array. After declaring a dynamic 
array, use the ReDim statement within a procedure to define 
the number of dimensions and elements in the array. If you 
try to redeclare a dimension for an array variable whose 
size was explicitly specified in a Dim statement, an error 
occurs.


ReDim Statement
Declares dynamic-array variables, and allocates or 
reallocates storage space at procedure level.

ReDim [Preserve] varname(subscripts) [, varname
(subscripts)] . . .

The ReDim statement is used to size or resize a dynamic 
array that has already been formally declared using a 
Private, Public, or Dim statement with empty parentheses 
(without dimension subscripts). You can use the ReDim 
statement repeatedly to change the number of elements and 
dimensions in an array.

If you use the Preserve keyword, you can resize only the 
last array dimension, and you can't change the number of 
dimensions at all. For example, if your array has only one 
dimension, you can resize that dimension because it is the 
last and only dimension. However, if your array has two or 
more dimensions, you can change the size of only the last 
dimension and still preserve the contents of the array. 

The following example shows how you can increase the size 
of the last dimension of a dynamic array without erasing 
any existing data contained in the array. 

ReDim X(10, 10, 10)
. . .
ReDim Preserve X(10, 10, 15)
Caution   If you make an array smaller than it was 
originally, data in the eliminated elements is lost.
 
Is This Answer Correct ?    0 Yes 2 No
Deepa
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
what is difference between application testing and product testing? IBM1
wht is the difference betn check point and output value? BirlaSoft4
what is main difference between QTP 8.2 AND QTP 9.0/9.2 HOME PAGE?i mean what are extra thing in QTP 9.0 than in QTP 8.2? Infosys1
How do we create and run the scripts with out using O.R. ?  4
How many ways we can parameterize data in QTP? Liquid-Crystal5
What is the difference between Dim And Redim IBM3
we r conduction testing on a project USING QTP, regarding that project the object repository is full ? Till that project having objects that r not recognised by repository, then what wil you do? How we wil recogine remailning objects? Is it possible to maintain another shared(or)peraction repository? what is the maximum capcity of object repository? How the technical people decide this much object repository is enoughf for this project? AppLabs7
Can any one tell me Difference between Keyword Driven Frame work and Hybrid framework? Its Urgent. IBM1
What is the use of "Step Generator" in QTP??for what purpose we are using??explain with an example  2
How u call functions in QTP Lehman-Brothers4
what is active screen,keyboard view? BirlaSoft2
During test run,How will you copy/paste from/to clipboard?  2
What is obsolute path and relative path in QTP..? How to access them and what are the differences between them...?? Virtusa1
give me the code for check point for validating application  1
Write a Script With descriptive programming(Without Repository) to update an Update an order in Flight App and verify whether it is done successfully.(Use ChildObjects method)  1
how to use import and export sheet methods in qtp  1
Can we create test script with out Step Generator?  4
Explain about the Test Fusion Report of QTP?  1
wt is the difference between global and action excel database in qtp?for example one action is calling another action the second action is using action excell sheet?if it is using global sheet what makes the difference? Datamatics1
Wher to use DATA TABLE METHODS in Qtp?What is the use of it? Wipro5
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com