You are here: Symbol Reference > MtxExpr Namespace > Classes > Vector Record > public > Vector.Length Property
MtxVec VCL
ContentsIndex
PreviousUpNext
Vector.Length Property

Defines the length in number of samples.

Pascal
property Length: integer;

Defines the number of samples that the Vector can store. The length property does not map directly to memory reallocation when it is changed. Until the amount of preallocated memory is not exceed, there is no reallocation going on. 

Changing the Length property will preserve the existing values, but only if the new property value is smaller than the amount of preallocated memory. To properly resize the memory allocated use the Resize method. 

It is recommended that vector sizes do not exceed the size of preallocated memory to increase performance. The size of preallocated memory can be controlled via the Controller global variable which is defined in the MtxVec unit.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!