How can we change(increase or decrease)the size of a array
variable with out loosing the previous values



How can we change(increase or decrease)the size of a array variable with out loosing the previous ..

Answer / pratap h s

Dim a(10) is array declared

if we want to change the size of array it should be
declared with redin as below

ReDim A(10)

to preserve the contents of array we need to use preerve
keyword as below

ReDim Preserve A(10)

above line is Answer ,,,, by declaring array as above it
will preserve the valus

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More QTP Interview Questions

how can i pass parameters into function?

4 Answers   Livetek,


I have one bitmap image in my webpage. The bit map image is moving like 1 place to 2nd place and 2nd place to 3rd place Etc… in my webpage. I wanted to write script for dynamical objects like above example. Could you please send me the answer for above query.

9 Answers   IBM,


What is log file? what is the use of Log fine. How to create? what are the contents and the main advantages of log files. plz do help me in this concepts as i have an interivew on qtp in a couple of days. plz do help me.. thanks in Advance.

1 Answers  


Can anyone tell me how i used QTP 9.2 use for GIS based S/w with an example?

0 Answers   IBM,


Does quicktest professional is unicode compatible?

0 Answers  


How will you test a stapler?

0 Answers  


Could you please any body help me.for example in web table in the first row and first column there are 3 links like l1,l2,l3 having indexes 0,1,2 but second time links will change their order like l2,l3,l1 and indexes also changed how can we handle this situvation with script....

2 Answers  


how to add a runtime parameter to a data sheet?

6 Answers  


plz tel me what is the differnce between QC & QTP?

3 Answers   iGate, Satyam,


How can I import environment from a file on disk?

0 Answers  


How to load object properties to object repository through scripting.give one example

7 Answers   IBM,


How can we fill data in a text box without recording using object spy. Can you please provide the steps...

1 Answers   Hotel Jobs, TCS,


Categories