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...


What is the difference between Dim And Redim

Answers were Sorted based on User's Feedback



What is the difference between Dim And Redim..

Answer / ravi_kanakam

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 ?    97 Yes 9 No

What is the difference between Dim And Redim..

Answer / paayal

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 ?    59 Yes 16 No

What is the difference between Dim And Redim..

Answer / deepa

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 ?    20 Yes 7 No

What is the difference between Dim And Redim..

Answer / sabitha reddy

Dim statement is used to declare a variable

The redim statement is used to change the array size within the script,

for example..
if we have declared an array dim customer (30)
but after that we want to change the size of the array , we can do it with the help of Redim statement
like-Redim customer(100)

Is This Answer Correct ?    14 Yes 5 No

Post New Answer

More QTP Interview Questions

Hi Guys, I tried to install java add-in for QTP 9.5 after the whole installation but it didn't install but then i also found in documentation saying that winrunner7.6 patch for java plugin would work fine with QTP. But when i tried to install from winrunner7.6 it asks me for the path of winrunner So my question is are we supposed to install winrunner for java add in to work on QTP. Please suggest me

1 Answers  


pls help me with scripting,right from the beginning in QTP

1 Answers  


Hi friends, In a particular test how many maximum call to new actions we can call?It reusable or normal actions what ever it is .

1 Answers   AppLabs,


Synchronizing test

3 Answers   Wipro,


Can any one tell me.......How the test engg's start testing in the compy environment.....real time tester PLSSSS help me i need in depth information regarding this...

0 Answers  


how do i know how to use tools

0 Answers  


It is regarding VBScript, how to export our function results to ExcelSheet through VBscripting. Ex: I have written add function, that result should export to Excel.

3 Answers  


Excepton Handling?

0 Answers   Wipro,


What is keyword driven framework, what is "key" in It.

2 Answers   IBM,


what is the default ordinal identifier.what are the send keys in qTP.

1 Answers  


What are main panes available in qtp test browser?

0 Answers  


In a web page, one web table is present which is dynamic. In that table one of the column has links with the same inner text. write a script so that i need to click the third link.

3 Answers  


Categories