System.IsDynArrayRectangular
Delphi
function IsDynArrayRectangular(const DynArray: Pointer; typeInfo: Pointer): Boolean;
C++
extern DELPHI_PACKAGE bool __fastcall IsDynArrayRectangular(const void * DynArray, void * typeInfo);
Propriétés
| Type | Visibilité | Source | Unité | Parent |
|---|---|---|---|---|
| function | public | System.pas System.hpp |
System | System |
Description
Renvoie si un tableau dynamique est rectangulaire.
IsDynArrayRectangular renvoie une valeur booléenne indiquant si le tableau dynamique DynArray est rectangulaire. Un tableau dynamique est rectangulaire si chaque dimension contient des sous-dimensions de la même taille.
Le paramètre typeInfo représente les informations de type du tableau. Voir la fonction TypeInfo.
Exemple
type
T2DDynamArray = array of array of String;
var
A: T2DDynamArray;
IsRectangular: Boolean;
begin
SetLength(A, 8, 9);
IsRectangular := IsDynArrayRectangular(Pointer(A), TypeInfo(T2DDynamArray)); // True
SetLength(A, 2);
SetLength(A[0], 8);
SetLength(A[1], 9);
IsRectangular := IsDynArrayRectangular(Pointer(A), TypeInfo(T2DDynamArray)); // False
end.