The VBScript Network and Systems Administrator's Cafe

Aug 17 2008   2:02AM GMT

VBScript Statements: Explanation of the ReDim Statement



Posted by: Jerry Lees
Tags:
arrays
dimensional arrays
redim
VBScript Statements

The ReDim statement in VBScript allows you to declare a array, or a multi-dimensional array, in your code. Also, this statement allows you to re-declare the number of elements in the array at a later time in the code.

This is important because it also allows you to release memory or allocate more memory for use in your script.

As you use this statement, be sure to use the Preserve keyword if you wish to preserve the existing data in the array.

Below are examples:

Dim x(10)
ReDim x(15)

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: