Name
TVarArray Type
Syntax
type TVarArray = packed record DimCount: Word; Flags: Word; ElementSize: Integer; LockCount: Integer; Data: Pointer; Bounds: array[0..255] of TVarArrayBound; end;
Description
The TVarArray
record stores the information used
to implement a Variant
array.
TVarData
stores a pointer to a
TVarArray
record when the
Variant
type includes the
varArray
bit.
- DimCount
Stores the number of dimensions, which is always in the range 1..64.
- Flags
Feature flags that Windows uses to keep track of the array’s memory and how to manage it.
- ElementSize
The size in bytes of each element of the array. The element size depends on the element type, as stored in the
VType
field ofTVarData
.
- LockCount
The lock count is usually zero. It is incremented when you call
VarArrayLock
and decremented when you callVarArrayUnlock
. The only time you can resize an array is when itsLockCount
is zero.
- Data
A pointer to the array’s data. The actual contents of the array are stored in a single dimensional array, where the leftmost subscript varies fastest (row-major order).
- Bounds
An array of
TVarArrayBound
records to keep track of the bounds for each array dimension. TheBounds
member is allocated dynamically, so it actually containsDimCount
records.
See TVarData
to see how a
Variant
stores the pointer to the
TVarArray
record.
See Also
PVarData Type, TVarArrayBound Type, TVarData Type, VarArrayCreate Function, VarArrayDimCount Function, VarArrayHighBound Function, VarArrayLock Function, VarArrayLowBound Function, ... |
Get Delphi in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.