[RESOLVED] When Memory is allocated?

suppose i declare an Array
Dim MyArr[100] As Integer
when memory of the above declared array will be allocated? suppose i use only 10 indexes of the Array and leave remaining 90 Indexes.
will remaining 90 indexes will grab memory or not if they are not in use?
[283 byte] By [chunks] at [2007-11-20 10:32:03]
# 1 Re: [RESOLVED] When Memory is allocated?
Nope, it uses whatever you declare it as.

Unless you do this:

Dim MyArr() As Integer
dim x as integer

then you'd do this:

x=0
'
'
redim preserve MyArr(x+100) as integer

that way you create indexes as you use them, but not each time you add an item.
dglienna at 2007-11-9 19:34:46 >
# 2 Re: [RESOLVED] When Memory is allocated?
understood
Thanks dglienna
chunks at 2007-11-9 19:35:44 >