GetDimensions is missing
Skybuck Flying <[email protected]> Thu, 12 Jan 2023 22:55:10 -0800 (PST)
| Newsgroups | alt.comp.lang.borland-delphi |
|---|---|
| Message-ID | <[email protected]> |
type TArrayOfArrayOfArrayOfInteger = array of array of array of integer; Trying to implement TrySetLength requires knowing the element type of the array, however it also requires knowing the number of dimensions for the third parameter to DynArraySetLength which is a bit of a problem for writing a generic TrySetLength function... procedure DynArraySetLength(var a: Pointer; typeInfo: Pointer; dimCnt: NativeInt; lengthVec: PNativeint); There is Length(DynamicArray) to figure out the length of the array, but this only applies to the first dimension. There is no GetDimensions function for Delphi to be able to acquire the number of dimensions for a dynamic array type... Bye for now, Skybuck.