Array of arrays
The declaration of an "array of arrays" is an alternative notation for multidimensional arrays. Instead of dimensioning the elements, a collection of elements is nested. Any nesting depth can be used.
Syntax
<variable name> : ARRAY[<first>] ( OF ARRAY[<next>] )+ OF <data type> ( := <initialization> )? ;<first> : <first lower index bound>..<first upper index bound>
<next> : <lower index bound>..<upper index bound> // one or more arrays
<data type> : elementary data types | user defined data types | function block types
// (...)+ : One or more further arrays
// (...)? : OptionalSyntax
Declaration:
<variable name> : ARRAY[<dimension>] OF ARRAY[<dimension>] OF <data type> := [<initialization>];
  | Array name Sample:   | 
  | Dimension (lower to upper index limit) Sample:  A dimension can have any number of indexed elements, determined by the lower and upper index limits. The index limits are integers up to data type DINT.  | 
ARRAY[<dimension>] OF ARRAY[<dimension>] OF ARRAY[<dimension>] OF  | Triple nested array Sample:   | 
  | Data type of the element: 
  | 
  | Initial values of the array (optional)  | 
Data access:
<variable name>[<index of first array>][<index of next array>][…]
  | Array name Sample:   | 
  | Index of the first (outer) arrays  | 
  | Index of the next (inner) array  | 
Sample
The variables aPoints and a2Boxes combine the same data elements, but the notation for declaration and data access are different.
PROGRAM MAIN
VAR
    aPoints : ARRAY[1..2,1..3] OF INT := [1,2,3,4,5,6];
    a2Boxes : ARRAY[1..2] OF ARRAY[1..3] OF INT := [ [1, 2, 3], [ 4, 5, 6]];
    a3Boxes : ARRAY[1..2] OF ARRAY[1..3] OF ARRAY[1..4] OF INT := [ [ [1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12] ], [ [13, 14, 15, 16], [ 17, 18, 19, 20], [21, 22, 23, 24] ] ];
    a4Boxes : ARRAY[1..2] OF ARRAY[1..3] OF ARRAY[1..4] OF ARRAY[1..5] OF INT;
END_VARaPoints[1, 2] := 1200;
a2Boxes[1][2] := 1200;