Thursday, May 21, 2009

Arrays in QTP

Dim a(3) ' Allocates the fixed storage space. can't be changed dynamically when array size fixed.
a(0) = 0
a(1) = 1
a(2) = 2
a(3) = 3
'a(4)= 4 'subscript out of range error
For each ite in a
msgbox ite ' o/p : 0 1 2 3
Next
Erase a ' Each element is reinitialized and Free memory used by array.

No comments:

Post a Comment