I want to define an array.
My question is Dim x(999) or Dim x(9999) will cost the same or Dim x(9999) will waste more resource?
Thank you very much!!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Naturally creating an array with 9999 elements in it will use more memory than an array with only 999. I suspect that this is not really your question though. Maybe you are trying to figure out a way to allocate enough memory for a dynamic amount of data? You can resize arrays in classic ASP (VBScript) using the ReDim statement – you could do this once the true size is known.