-
Changing Array Length Problem
Hey I have a probelm, I'm have a website that uses a Shopping Cart and in
the code it says that there is a Array Mismatch Etc. I'm not very familiar
with Arrays Etc and I was wondering if someone can tell me how to change
the Array Lengths so I can fix this problem
Thanks Damo
-
Re: Changing Array Length Problem
dim myarray(5)
redim myarray(7)
x = 8
redim myarray(x)
"Damo" <superstormtrooperdamo@hotmail.com> wrote in message
news:3da4f3e6$1@10.1.10.29...
>
> Hey I have a probelm, I'm have a website that uses a Shopping Cart and
in
> the code it says that there is a Array Mismatch Etc. I'm not very
familiar
> with Arrays Etc and I was wondering if someone can tell me how to
change
> the Array Lengths so I can fix this problem
> Thanks Damo
-
Re: Changing Array Length Problem
Use ReDim instead of Dim If you have MSDN installed read up on Arrays.
They are fun! 
http://java.sun.com/docs/books/tutor...ta/arrays.html
-
Re: Changing Array Length Problem
If you need to expand the size of an existing array you have 2 choices:
1) ReDim Preserve MyArray(nNewSize) - The preserve option keeps the data
in the array. Without preserve your new array size is increased, but existing
data is lost. ReDim Preserve easy to code, but it can be expensive (slow),
so you might prefer option 2.
2) Build a new array (for large arrays this is fastest):
Dim NewArray()
ReDim NewArray(nNewSize)
For i = LBound(MyArray) to UBound(MyArray)
NewArray(i) = MyArray(i)
Next
"Damo" <superstormtrooperdamo@hotmail.com> wrote:
>
>Hey I have a probelm, I'm have a website that uses a Shopping Cart and in
>the code it says that there is a Array Mismatch Etc. I'm not very familiar
>with Arrays Etc and I was wondering if someone can tell me how to change
>the Array Lengths so I can fix this problem
>Thanks Damo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|