You are here: Symbol Reference > MtxVec Namespace > Classes > TVec Class > public > Split Method > TVec.Split Method (array of TVec)
MtxVec VCL
ContentsIndex
PreviousUpNext
TVec.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 TMtxVec.ComplexComplexproperties of vectors in Dst array must be set explicitly. An exception is raised, if TMtxVec.ComplexComplexproperties of TVec objects do not match or the sum of TVec lengths exceeds the Length of the calling vector.

var a,b,c,d: TVec; begin CreateIt(a,b,c,d); try 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] finally FreeIt(a,b,c,d); end; end;
Examples on GitHub
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!