The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



CopyFrom


Unit:SDL_vector
Class: TVector, TIntVector
Declaration: [1] function CopyFrom (Src: TDoubleArray; SrcElemLo, SrcElemHi, DestElem: integer): integer; { class TVector }
[2] function CopyFrom (Src: TIntArray; SrcElemLo, SrcElemHi, DestElem: integer): integer; { class TIntVector }
[3] function CopyFrom (Src: TVector; SrcElemLo, SrcElemHi, DestElem: integer): integer; { class TVector }
[4] function CopyFrom (Src: TIntVector; SrcElemLo, SrcElemHi, DestElem: integer): integer; { class TIntVector }

The method CopyFrom copies a part of the vector Src to self.The range of elements which are to be copied is specified by the parameters SrcElemLo and SrcElemHi. The destination area is determined by the parameter DestElem. The source vector element addressed by SrcElemLo is copied to the destination element addressed by DestElem. All other elements (up to source vector address SrcElemHi ) are copied to the destination vector at increasing addresses. The copying process stops at the boundaries of the destination vector.

Hint 1: Setting both SrcElemLo and SrcElemHi to zero is a shortcut for copying the entire source array or source vector.

Hint 2: SrcElemLo needs not be smaller than SrcElemHi, since the method CopyFrom automatically corrects for exchanged boundaries.

Example: The statement VZiel.CopyFrom(VQuell,10,22,1); copies the vector elements 10 to 22 of the vector VQuell to the destination vector VZiel at the addresses 1 to 13.


Last Update: 2023-Feb-06