You are here: Symbol Reference > MtxExpr Namespace > Classes > Vector Record > public > Split Method > Vector.Split Method (array of TVec)
MtxVec VCL
ContentsIndex
PreviousUpNext
Vector.Split Method (array of TVec)

Splits the calling vector to an array of TVec objects.

Pascal
function Split(const Dst: array of TVec): TVec; overload;

Copy the contents of the calling TVec object to the TVec objects in Dst array. The Length and Complex properties of vectors in Dst array must be set explicitly. An exception is raised, if Complex properties of TVec objects do not match or the sum of TVec lengths exceeds the Length of the calling vector.

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