Summary
Concatenates an array of TVec objects.
Class
TVec
Declaration
Function Concat(Index: integer; const Src: array of TVec): TVec;
Description
Copies the contents of all TVec objects from the Src array to the calling vector elements, starting with at Index. The
Length and
Complex properties of the calling vector must be set explicitly. An exception is raised, if Complex properties of TVec objects do not match or if the sum of Length's exceeds the Length property of the calling object.
Declaration
Function Concat(const Src: array of TVec): TVec;
Description
Concatenates an array of TVec objects. The method copies the contents of all TVec objects from the Src array to the calling object. The
Length and
Complex properties of the calling vector are set implicitly. An exception is raised, if Complex properties of TVec objects do not match.
Example 1
var a,b,c,d: TVec;
begin
CreateIt(a,b,c,d);
try
a.SetIt(False,[1,2,3]);
b.Copy(a);
c.Concat([a,b]); // c = [1,2,3,1,2,3]
d.Size(10,True);
d.SetZero(0,4);
d.Concat(4,[c]); // d = [0,0,0,0,1,2,3,1,2,3]
finally
FreeIt(a,b,c,d);
end;
end;
| Copyright 2008 Dew Research |
http://www.dewresearch.com