System.DynArrayIndex
Delphi
function DynArrayIndex(P: Pointer; const Indices: array of NativeInt; TypInfo: Pointer): Pointer; overload;
function DynArrayIndex(P: Pointer; const Indices: array of Integer; TypInfo: Pointer): Pointer; overload;
C++
extern DELPHI_PACKAGE void * __fastcall DynArrayIndex(void * P, const int *Indices, const int Indices_High, void * TypInfo)/* overload */;
Properties
| Type | Visibility | Source | Unit | Parent | 
|---|---|---|---|---|
| function | public | System.pas System.hpp | System | System | 
Description
Returns a pointer to a specific dynamic array element.
DynArrayIndex returns a pointer to an element specified by an index from a dynamic array.
Example
type
  T2DDynamArray = array of array of Integer;
var
  A: T2DDynamArray;
  P: Pointer;
begin
  SetLength(A, 3, 4);
  A[1][2] := 100;
  P := DynArrayIndex(Pointer(A), [1, 2], TypeInfo(T2DDynamArray));
  Writeln(IntToStr(PInteger(P)^)); // displays 100
end.