You are here: Symbol Reference > MtxVecInt Namespace > Classes > TVecInt Class > public > Resize Method > TVecInt.Resize Method (integer, boolean)
MtxVec VCL
ContentsIndex
PreviousUpNext
TVecInt.Resize Method (integer, boolean)

Resizes calling vector Length to Len.

Pascal
function Resize(Len: integer; ZeroIt: boolean = False): TVecInt; overload;

If Length is less than Len and ZeroIt parameter is true, the remaining calling vector values are set to zero.

var a: TVecInt; begin CreateIt(a); try a.SetIt([1,2,3]); a.Resize(7,True); // a= [1,2,3,0,0,0,0] finally FreeIt(a); end; end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!