רק כאשר משתמשים ב-Preserve ניתן לשנות רק את המימד האחרון.
לפני שתתחיל לספר לי כמה אני טועה ובלה בלה, קבל:
If you use the
Preserve keyword, you can resize only the last array dimension
and you can't change the number of dimensions at all. For example, if your array
has only one dimension, you can resize that dimension because it is the last and
only dimension. However, if your array has two or more dimensions, you can change
the size of only the last dimension and still preserve the contents of the array. The
following example shows how you can increase the size of the last dimension of a
dynamic array without erasing any existing data contained in the array.
קוד:
ReDim X(10, 10, 10)
. . .
ReDim Preserve X(10, 10, 15)
Similarly, when you use
Preserve, you can change the size of the array only by
changing the upper bound; changing the lower bound causes an error.