You are here: Symbol Reference > MtxExprInt Namespace > Classes > VectorInt Record > public > Resize Method > VectorInt.Resize Method (integer, boolean)
MtxVec VCL
ContentsIndex
PreviousUpNext
VectorInt.Resize Method (integer, boolean)

Resizes calling vector Length to Len.

Pascal
function Resize(const Len: integer; const 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-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!