You are here: Symbol Reference > MtxExpr Namespace > Classes > Vector Record > public > SetIt Method > Vector.SetIt Method (boolean, array of double)
MtxVec VCL
ContentsIndex
PreviousUpNext
Vector.SetIt Method (boolean, array of double)

Sets vector values.

Pascal
function SetIt(AComplex: boolean; const A: array of double): TVec; overload;

SetIt makes the use of open array construction, to set the values of the calling vector. It gives you the possibility to pass large arrays of elements without having to declare constant arrays. 

Sets the Length property of the calling vector to (High(A)+1) and the Complex property to AComplex. The elements of A array are copied to the calling vector. If AComplex is True then real parts of complex numbers are on even (0,2,4..)and imaginary parts on odd indexes.(1,3,5,..)

var a: Vector; begin a.SetIt(False,[1,2,3,4]); // a = [1,2,3,4] end;
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!