<< Click to Display Table of Contents >> Navigation: »No topics above this level« Arrays |
mapp Services V5.16
Multidimensional array types and variables are supported.
TYPE
ArrayType : ARRAY[1..10] OF DINT;
MatrixType : ARRAY[1..5] OF ArrayType; (* Array of an array of DINT *)
END_TYPE
VAR
Cube1 : ARRAY[1..3, 1..5, 1..10] OF DINT;
Cube2 : ARRAY[1..3] OF MatrixType;
Cube3 : ARRAY[1..3, 1..5] OF ArrayType;
END_VAR
PROGRAM _MAIN
Cube1[3, 5, 10] := 1; (* DINT element, cell in array Cube1 *)
Cube2[3][5][10] := 2; (* DINT element, cell in array Cube2 *)
Cube3[3, 5][10] := 3; (* DINT element, cell in array Cube3 *)
END_PROGRAM