System.DynArrayIndex
De RAD Studio API Documentation
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, int const *Indices, const int Indices_Size, void * TypInfo)/* overload */;
Propriétés
| Type | Visibilité | Source | Unité | Parent |
|---|---|---|---|---|
| function | public | System.pas System.hpp |
System | System |
Description
Renvoie un pointeur sur un élément de tableau dynamique spécifique.
DynArrayIndex renvoie un pointeur sur un élément spécifié par un index d'un tableau dynamique.
Exemple
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.