Multi dimenson Array Size How ?

 

int TEST1 [20];

int TEST2 [20][2];

int TEST3 [20][2][2];

ArraySize(TEST1) = 20; Great for 1 dimension arrays

ArraySize(TEST2) = 40; As the is 2 * 20 elements in the array

ArraySize(TEST3) = 80; As the is 2 * 2 * 20 elements in the array

I want to get the number of lines/records in TEST2 and TEST3, so how can I get array size for TEST2 or TEST3 to be equal to 20.

Without be very crude and doing : ArraySize(TEST2)/2 = 20

Thanks in advance

HANG ON.... is this the solution..

int ArrayRange( object array[], int range_index)
Returns the count of elements in the given dimension of the array. Since indexes are zero-based, the size of dimension is 1 greater than the largest index.

Parameters:

array[] - Array to check
range_index - Dimension index.