nikki333
12-06-2019, 12:36 PM
Hi Folks
I've always had trouble with arrays; should they start from 0 or 1? mulitdimesion or not?....
Currently, I'm trying to declare two one dimesional arrays and then consolidate them in another array.
Simple example (with Option base 1):
arrCardsCategories = Array("Hearts", "Tiles", "Pikes", "Clovers")arrCardsValues = Array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13")
ReDim arrCardsTotal(1 To UBound(arrCardsCategories) * UBound(arrCardsValues), 1 To 1)
for i = 1 to ubound(arrCardsCategories)
for j = 1 to ubound(arrCardsValues)
arrCardsTotal(i, j) = arrCardsCategories(i) & arrCardsValues(j)
next j
next i
The problem is that the first two arrays are "one-dimensional", while the other array is 2-dimensional.
In essence, I just want to put those ****ing 52 cards in one array (1 to 52). Is there a way to define simple arrays like above to two-dimensional?
I've always had trouble with arrays; should they start from 0 or 1? mulitdimesion or not?....
Currently, I'm trying to declare two one dimesional arrays and then consolidate them in another array.
Simple example (with Option base 1):
arrCardsCategories = Array("Hearts", "Tiles", "Pikes", "Clovers")arrCardsValues = Array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13")
ReDim arrCardsTotal(1 To UBound(arrCardsCategories) * UBound(arrCardsValues), 1 To 1)
for i = 1 to ubound(arrCardsCategories)
for j = 1 to ubound(arrCardsValues)
arrCardsTotal(i, j) = arrCardsCategories(i) & arrCardsValues(j)
next j
next i
The problem is that the first two arrays are "one-dimensional", while the other array is 2-dimensional.
In essence, I just want to put those ****ing 52 cards in one array (1 to 52). Is there a way to define simple arrays like above to two-dimensional?