function Copy(const Src: TMtxVecInt): TMtxVecInt;
Copy object values.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecInt |
Result: stored in self (calling object), returns self for chaining
Remarks:
Copy each of Vec elements to the calling object. Size and precision properties of the calling object are set implicitly to match Vec object.
Examples
uses MtxVecInt;
procedure Example;
var a,b: TMtxVecInt;
begin
a := TMtxVecInt.Create();
b := TMtxVecInt.Create();
try
a.SetIt([1,2,3,4]); // a = [1,2,3,4]
b.Copy(a); // b = [1,2,3,4]
finally
a.Free;
b.Free;
end;
end;
Indexed: function Copy(const Src: TMtxVecInt; const SrcIndex: Integer; const Index: Integer; const Len: Integer): TMtxVecInt;
Copy Src elements [SrcIndex]..[SrcIndex+Len-1] in the calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TMtxVecInt | |
| 2 | SrcIndex | Integer | source start index |
| 3 | Index | Integer | start index |
| 4 | Len | Integer | element count |
Result: stored in self (calling object), returns self for chaining
Remarks:
Vector VectorInt.Size must be set explicitly. An exception is raised if array borders are overrun or underrun.