VBD пишет:
скорее всего низкоуровневое увеличение размера массива без бонусов. Такого, не спорю, в VB6 нет (встроенного). ReDim PReserve создает новый увеличенный массив, копирует в него данный и удаляет его (данный). Получаем увеличение массива. В VB6 с этим можно не запариваться и считать, что он увеличивает (или уменьшает) размер массива:
VBD, можешь рассказать зачем ты ты сейчас пересказываешь то что я написал 4 дня назад в 6 посту? Кому это интересно, уже прочитали оригинал.
Тогда бы уже и скопировал и про сложность операций и про то как с этим бороться, чтоб хоть немного афторитетнее выглядеть.
Dim b() aslong
Redim b(0) aslong
b(0) = 1
ReDim PReserve b(1)
b(1) = 2
Офигеть. VBD, а зачем ты нам этот нубокод пишешь?
Мы ждем демонстрации как с помощью Redim Preserve изменять сразу несколько границ многомерного массива! Многомерного - значит чтоб в нем было хотя бы 2 размерности.
VBD, можешь рассказать зачем ты ты сейчас пересказываешь то что я написал 4 дня назад в 6 посту?
Признаюсь. Я каждую ночь надеваю валенки на руки, рисую себе на жопе эмблему дотнет и выхожу на улицу на руках и всем пересказываю посты SteelBrand'а.
Офигеть. VBD, а зачем ты нам этот нубокод пишешь?
А разве, по-твоему, я когда-то писал нормальный код?
Мы ждем демонстрации как с помощью Redim Preserve изменять сразу несколько границ многомерного массива! Многомерного - значит чтоб в нем было хотя бы 2 размерности.
Можно изменить только жопу:
Dim b() aslong
Redim b(10,10) aslong
b(3,8) = 1
ReDim PReserve b(10,11)
b(4,11) = 2
Или так. Если хочешь, можешь засунуть в свой любимый класс.
Type NumArr
Num() AsInteger
End Type
Dim Nums() As NumArr
Sub Main()
Redim Preserve Nums(0 To 5)
For i = 0 To 5
ReDimPreserve Nums(i).Num(0 To 6)
Next
EndSub
И вообще, как я тебя могу отучить нелюбить VB6? Ну скажи? Никак. Так что успокойся.
VBD о чем задумался?
Надеюсь не о глупостях каких нибудь?
Редим пашет, с этим вроде никто не спорил, Пресерв кривой и с этим безсмысленно спорить.
Нет у него свободы изменить массив даже в двух плоскостях, о большем и думать не стоит.
Артем не юли, тыж знаешь, что определить размер массива лучше заранее по свойству RecordCount, а не внутри цикла, тебе религия непозволяет принять мою сторону.
И то, что VBD нуб это твоя персональная галлюцинация, думаю никто больше этого не заметил
фига ссе извращение... а что Jagged arrays в VB6 разве нету или теперь такая шляпа считается нормальной?
определить размер массива лучше заранее по свойству RecordCount
если я не ошибаюсь, то в VB6 + DAO ввиду того что там нету отсоединенных наборов данных чтобы получить RecordCount надо было выполнить MoveLast, чтобы переместить указатель на последнюю строку и только после этого в свойстве RecordCount будет находится достоверное значение. Разумеется перед вызовом MoveLast надо было проверить а есть ли там записи вообще!? Иначе получишь исключение..
Так что далеко не всегда RecordCount бывает одинаково полезен..
Вам платят чтоли, чтоб вы освежали в памяти вб6?
Если нет, значит вы задаром "дерьмо" обсуждаете.
Раз уж вас так тянет на вб6, то хоть не обзывайте его, а то на дерьмофилию смахивает .
Чтоб не согласится со мной признаете подход Fifа правильным?
Ладно, раз так модно нынче пусть циклом записи считает, и мне радость и ему гемморой .
Базы данных в вб6 на DAO не заканчиваются, но пофиг, главное тема снова смешной становится.
Надоели. Функция ReDimPreserve изменяет размер многомерного массива с сохранением данных.
1. Поддерживается до 37 измерений. То есть самое хардкорное, что поддерживается - 37-мерный массив
2. Нельзя менять измерение массива. То есть нельзя, например, превратить 2-мерный массив в трехмерный и наоборот. Если кто хочет, может доработать мой код
Function ReDimPreserve(Arr, ParamArray Razm() AsVariant)
Dim g
Dim i AsLong
Dim gs
Dim BigDem() AsLong, LowDem() AsLong
IfNot IsNumeric(Razm(0)) And UBound(Razm) = 0 Then
gs = Split(Razm(0), ",")
ReDim BigDem(UBound(gs))
ReDim LowDem(UBound(gs))
For i = 0 To UBound(gs)
gs(i) = LCase(gs(i))
If InStr(1, gs(i), "to") Then
LowDem(i) = Val(Split(gs(i), "to")(0))
BigDem(i) = Val(Split(gs(i), "to")(1))
Else
BigDem(i) = Val(gs(i))
EndIf
Next
Else
ReDim BigDem(UBound(Razm))
ReDim LowDem(UBound(Razm))
For i = 0 To UBound(Razm)
IfNot IsNumeric(Razm(i)) Then
LowDem(i) = Val(Split(LCase(Razm(i)), "to")(0))
BigDem(i) = Val(Split(LCase(Razm(i)), "to")(1))
Else
BigDem(i) = Val(Razm(i))
EndIf
Next
EndIf
If UBound(BigDem) = 0 ThenReDim g(LowDem(0) To BigDem(0))
If UBound(BigDem) = 1 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1))
If UBound(BigDem) = 2 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2))
If UBound(BigDem) = 3 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3))
If UBound(BigDem) = 4 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4))
If UBound(BigDem) = 5 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5))
If UBound(BigDem) = 6 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6))
If UBound(BigDem) = 7 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7))
If UBound(BigDem) = 8 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8))
If UBound(BigDem) = 9 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9))
If UBound(BigDem) = 10 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10))
If UBound(BigDem) = 11 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11))
If UBound(BigDem) = 12 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12))
If UBound(BigDem) = 13 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13))
If UBound(BigDem) = 14 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14))
If UBound(BigDem) = 15 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15))
If UBound(BigDem) = 16 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16))
If UBound(BigDem) = 17 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17))
If UBound(BigDem) = 18 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18))
If UBound(BigDem) = 19 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19))
If UBound(BigDem) = 20 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20))
If UBound(BigDem) = 21 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21))
If UBound(BigDem) = 22 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22))
If UBound(BigDem) = 23 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23))
If UBound(BigDem) = 24 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24))
If UBound(BigDem) = 25 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25))
If UBound(BigDem) = 26 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26))
If UBound(BigDem) = 27 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27))
If UBound(BigDem) = 28 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28))
If UBound(BigDem) = 29 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29))
If UBound(BigDem) = 30 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30))
If UBound(BigDem) = 31 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31))
If UBound(BigDem) = 32 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32))
If UBound(BigDem) = 33 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32), LowDem(33) To BigDem(33))
If UBound(BigDem) = 34 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32), LowDem(33) To BigDem(33), LowDem(34) To BigDem(34))
If UBound(BigDem) = 35 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32), LowDem(33) To BigDem(33), LowDem(34) To BigDem(34), LowDem(35) To BigDem(35))
If UBound(BigDem) = 36 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32), LowDem(33) To BigDem(33), LowDem(34) To BigDem(34), LowDem(35) To BigDem(35), LowDem(36) To BigDem(36))
If UBound(BigDem) = 37 ThenReDim g(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32), LowDem(33) To BigDem(33), LowDem(34) To BigDem(34), LowDem(35) To BigDem(35), LowDem(36) To BigDem(36), LowDem(37) To BigDem(37))
If UBound(BigDem) = 0 ThenReDim Arr(LowDem(0) To BigDem(0))
If UBound(BigDem) = 1 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1))
If UBound(BigDem) = 2 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2))
If UBound(BigDem) = 3 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3))
If UBound(BigDem) = 4 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4))
If UBound(BigDem) = 5 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5))
If UBound(BigDem) = 6 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6))
If UBound(BigDem) = 7 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7))
If UBound(BigDem) = 8 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8))
If UBound(BigDem) = 9 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9))
If UBound(BigDem) = 10 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10))
If UBound(BigDem) = 11 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11))
If UBound(BigDem) = 12 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12))
If UBound(BigDem) = 13 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13))
If UBound(BigDem) = 14 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14))
If UBound(BigDem) = 15 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15))
If UBound(BigDem) = 16 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16))
If UBound(BigDem) = 17 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17))
If UBound(BigDem) = 18 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18))
If UBound(BigDem) = 19 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19))
If UBound(BigDem) = 20 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20))
If UBound(BigDem) = 21 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21))
If UBound(BigDem) = 22 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22))
If UBound(BigDem) = 23 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23))
If UBound(BigDem) = 24 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24))
If UBound(BigDem) = 25 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25))
If UBound(BigDem) = 26 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26))
If UBound(BigDem) = 27 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27))
If UBound(BigDem) = 28 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28))
If UBound(BigDem) = 29 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29))
If UBound(BigDem) = 30 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30))
If UBound(BigDem) = 31 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31))
If UBound(BigDem) = 32 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32))
If UBound(BigDem) = 33 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32), LowDem(33) To BigDem(33))
If UBound(BigDem) = 34 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32), LowDem(33) To BigDem(33), LowDem(34) To BigDem(34))
If UBound(BigDem) = 35 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32), LowDem(33) To BigDem(33), LowDem(34) To BigDem(34), LowDem(35) To BigDem(35))
If UBound(BigDem) = 36 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32), LowDem(33) To BigDem(33), LowDem(34) To BigDem(34), LowDem(35) To BigDem(35), LowDem(36) To BigDem(36))
If UBound(BigDem) = 37 ThenReDim Arr(LowDem(0) To BigDem(0), LowDem(1) To BigDem(1), LowDem(2) To BigDem(2), LowDem(3) To BigDem(3), LowDem(4) To BigDem(4), LowDem(5) To BigDem(5), LowDem(6) To BigDem(6), LowDem(7) To BigDem(7), LowDem(8) To BigDem(8), LowDem(9) To BigDem(9), LowDem(10) To BigDem(10), LowDem(11) To BigDem(11), LowDem(12) To BigDem(12), LowDem(13) To BigDem(13), LowDem(14) To BigDem(14), LowDem(15) To BigDem(15), LowDem(16) To BigDem(16), LowDem(17) To BigDem(17), LowDem(18) To BigDem(18), LowDem(19) To BigDem(19), LowDem(20) To BigDem(20), LowDem(21) To BigDem(21), LowDem(22) To BigDem(22), LowDem(23) To BigDem(23), LowDem(24) To BigDem(24), LowDem(25) To BigDem(25), LowDem(26) To BigDem(26), LowDem(27) To BigDem(27), LowDem(28) To BigDem(28), LowDem(29) To BigDem(29), LowDem(30) To BigDem(30), LowDem(31) To BigDem(31), LowDem(32) To BigDem(32), LowDem(33) To BigDem(33), LowDem(34) To BigDem(34), LowDem(35) To BigDem(35), LowDem(36) To BigDem(36), LowDem(37) To BigDem(37))
For j = LowDem(0) To BigDem(0)
If UBound(BigDem) > 0 Then
For j1 = LowDem(1) To BigDem(1)
If UBound(BigDem) > 1 Then
For j2 = LowDem(2) To BigDem(2)
If UBound(BigDem) > 2 Then
For j3 = LowDem(3) To BigDem(3)
If UBound(BigDem) > 3 Then
For j4 = LowDem(4) To BigDem(4)
If UBound(BigDem) > 4 Then
For j5 = LowDem(5) To BigDem(5)
If UBound(BigDem) > 5 Then
For j6 = LowDem(6) To BigDem(6)
If UBound(BigDem) > 6 Then
For j7 = LowDem(7) To BigDem(7)
If UBound(BigDem) > 7 Then
For j8 = LowDem(8) To BigDem(8)
If UBound(BigDem) > 8 Then
For j9 = LowDem(9) To BigDem(9)
If UBound(BigDem) > 9 Then
For j10 = LowDem(10) To BigDem(10)
If UBound(BigDem) > 10 Then
For j11 = LowDem(11) To BigDem(11)
If UBound(BigDem) > 11 Then
For j12 = LowDem(12) To BigDem(12)
If UBound(BigDem) > 12 Then
For j13 = LowDem(13) To BigDem(13)
If UBound(BigDem) > 13 Then
For j14 = LowDem(14) To BigDem(14)
If UBound(BigDem) > 14 Then
For j15 = LowDem(15) To BigDem(15)
If UBound(BigDem) > 15 Then
For j16 = LowDem(16) To BigDem(16)
If UBound(BigDem) > 16 Then
For j17 = LowDem(17) To BigDem(17)
If UBound(BigDem) > 17 Then
For j18 = LowDem(18) To BigDem(18)
If UBound(BigDem) > 18 Then
For j19 = LowDem(19) To BigDem(19)
If UBound(BigDem) > 19 Then
For j20 = LowDem(20) To BigDem(20)
If UBound(BigDem) > 20 Then
For j21 = LowDem(21) To BigDem(21)
If UBound(BigDem) > 21 Then
For j22 = LowDem(22) To BigDem(22)
If UBound(BigDem) > 22 Then
For j23 = LowDem(23) To BigDem(23)
If UBound(BigDem) > 23 Then
For j24 = LowDem(24) To BigDem(24)
If UBound(BigDem) > 24 Then
For j25 = LowDem(25) To BigDem(25)
If UBound(BigDem) > 25 Then
For j26 = LowDem(26) To BigDem(26)
If UBound(BigDem) > 26 Then
For j27 = LowDem(27) To BigDem(27)
If UBound(BigDem) > 27 Then
For j28 = LowDem(28) To BigDem(28)
If UBound(BigDem) > 28 Then
For j29 = LowDem(29) To BigDem(29)
If UBound(BigDem) > 29 Then
For j30 = LowDem(30) To BigDem(30)
If UBound(BigDem) > 30 Then
For j31 = LowDem(31) To BigDem(31)
If UBound(BigDem) > 31 Then
For j32 = LowDem(32) To BigDem(32)
If UBound(BigDem) > 32 Then
For j33 = LowDem(33) To BigDem(33)
If UBound(BigDem) > 33 Then
For j34 = LowDem(34) To BigDem(34)
If UBound(BigDem) > 34 Then
For j35 = LowDem(35) To BigDem(35)
If UBound(BigDem) > 35 Then
For j36 = LowDem(36) To BigDem(36)
If UBound(BigDem) > 36 Then
For j37 = LowDem(37) To BigDem(37)
If UBound(BigDem) > 37 Then
MsgBox(("Вася я ш сказал не больше 37 измерений!!!")),vbExclamation
Правило пользования:
Первый аргумент функции - массив. Все, что после него - измерения. Измерения можно задавать как числом, так и строкой. Если измерение задано числом, то данное измерение будет в массиве иметь нижнюю границу 0, верхную - это самое число. Если измерение задается строкой, то функция парсит ее относительно слова "To". Т.е. строка должна быть вроде "3 To 5". Можно так же задать все размерности одной строкой. Но нельзя, например, три размерности задать одной строкой, другие - цифрами. Строкой можно задать либо по одной, либо все сразу.
Dim b() AsLong
ReDim b(12, 14, 25) AsLong
b(5, 6, 7) = 5
ReDimPreserve b, 20, 20, 20 'Можно.
ReDimPreserve b, "5 To 15", 20, "3 To 7"'Можно.
ReDimPreserve b, "5 To 15, 5 To 6, 3 To 8"'Можно.
'ReDimPreserve b, 20, "5 To 30, 3 To 6" 'Нельзя. Строкой задаем либо все сразу, либо по одному.