Datasheet

A variable m is an array of 50 elements, which in turn are arrays of 20 floats each.
Thus, we have a matrix of 50x20 elements: the first element is m[0][0], the last one
is m[49][19]. The first element of the 5th row would be m[4][0].
If you don't initialize the array in the declaration, you can omit the first dimension of
multi-dimensional array. In that case, array is located elsewhere, e.g. in another file.
This is a commonly used technique when passing arrays as function parameters:
int a[3][2][4]; /* 3-dimensional array of size 3x2x4 */
void func(int n[][2][4]) { /* we can omit first dimension */
...
n[2][1][3]++; /* increment the last element*/
}//~
void main() {
...
func(a);
}
You can initialize a multi-dimensional array with an appropriate set of values within
braces. For example:
int a[3][2] = {{1,2}, {2,6}, {3,7}};
157
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroC PRO for AVR
CHAPTER 5