Access to array elements is executed using element access expression in the form A[I1, I2, ..., In], where A is an array type expression and Ix is an expression of the type Integer, UInteger, Long, ULong or a type that can be implicitly converted to one of these types.
Array elements can be listed using the For Each statement.
Sub ArraySample();
Var
Arr: array[2, 2] Of integer = [[0, 1], [2, 3]];
ElementValue: integer;
Begin
//Element access
Arr[0, 0] := Arr[0, 1] + Arr[1, 0];
//Working with array in For Eachcycle
For Each ElementValue In Arr Do
//Value of array elements is available in the ElementValue variable
//Pass is executed by rows
End For;
End Sub;
See also: