You are here: Symbol Reference > MtxExprInt Namespace > Classes > VectorInt Record > Create Constructor > VectorInt.Create Constructor (integer)
MtxVec VCL
ContentsIndex
PreviousUpNext
VectorInt.Create Constructor (integer)

Constructor of the record.

Pascal
constructor Create(aLength: integer); overload;

Returns a Vector with internal TVecInt object created explicitely with Length property set to aLength and IntPrecision property set to int32. Call this constructor, if the Vector type variable is a global variable with a long life span.

var a,b: VectorInt; bvec: TVecInt; begin a := VectorInt.Create(true); //create from object cache via CreateIt //this constructor can be omitted, because it is implicitly called //the first time that the variable is used. //However: b := VectorInt.Create(10); //Similar to bvec := TVecInt.Create; try bvec.Size(10); finally bvec.Free; //b is freed on the exit from the procedure end; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!