Mismatched Array Dimensions

If the number of defined array dimensions does not match the number of array dimensions specified in an array reference, the evaluation proceeds anyway, following certain rules. Specified array dimensions are matched to defined array dimensions starting from the right and working towards the left. If more array dimensions were specified than were defined, that array expression is called "over specified". If more array dimensions were defined than were specified, that array expression is called "under specified".

Over specified array expressions will return an invalid value with one exception - if all leading over specified dimensions are 0, it will return element 0 of the specified array. For example:

Data[2][3];

Q = 4 + 3 * Data[X][1][2];

This will work if X is 0. Otherwise, Q will be set invalid. For under specified arrays, missing leading dimensions will default to 0. In the previous example, consider the statement:

V = 4 + 3 * Data[1];

This expression would use Data[1][0].