I know I can use Ubound and Lbound to find the size of the dimensions of a dynamic array. But is there anything I can use to determine the number of dimensions the array has at run time? I was hoping that Ubound(Array, n) would return something friendly like 0 or -1 if the dimension didn't exist, but it just bombs with subscript out of range.
Why, you might ask? Well, I'm refactoring an application that loads dozens of n-dimensional tables from files, and I want to write a utility method that compares two arrays so I can verify that the new method loads the arrays the same as the old method...
Of course, if there's a better way to do this like a nice simple CompareArray() function, then that would be even better!
Steve
[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object:
erlDesignPatterns)[/small]
Why, you might ask? Well, I'm refactoring an application that loads dozens of n-dimensional tables from files, and I want to write a utility method that compares two arrays so I can verify that the new method loads the arrays the same as the old method...
Of course, if there's a better way to do this like a nice simple CompareArray() function, then that would be even better!
Steve
[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object: