Search This Blog

Loading...

Thursday, 27 October 2011

Details of "Redim" & "Redim preserve"


NOTE:-
            QTP’s vbscript can allows you to resize array using “redim” stmt.

                                    Option explicit
                                    Dim x( )
                                    --------
                                    --------
                                    Redim x(10)
                                    --------
                                    --------
NOTE:-
            QTP’s vbscript allows you to resize array without losing existing data by using “preserve”.

                                    Option explicit
                                    Dim x( )
                                    ----------
                                    ----------
                                    Redim x(10)
                                    -----------
                                    -----------
                                    Redim preserve x(20)
                                    -----------
                                    -----------
                                    -----------

No comments:

Post a Comment