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....


Unit: SDL_datatable
Class: TDataTable
Declaration: procedure CopyFrom (ExtTab: TDataTable; SourceColLo, SourceRowLo, SourceColHi, SourceRowHi, DestCol, DestRow: integer);

The method CopyFrom copies a part of the matrix ExtTab into its own data area (self).

The region to be copied is specified by the the parameters SourceColLo, SourceRowLo, SourceColHi, and SourceRowHi (see figure below).

The destination area is defined by the parameters DestCol and DestRow. The element [DestCol,DestRow ] is filled by the value of the source matrix at address [SourceColLo,SourceRowLo ] and all other elements are copied to appropriate higher addresses. The figure below shows the copy process.

Hint: SourceColLo (or SourceRowLo, resp.) needs not to be lower than SourceColHi (or SourceRowHi ), since the method CopyFrom automatically allows for the correct copying sequence.

Example: The statement MD.CopyFrom (MS, 10,10,12,12,1,5); copies the elements [10,10] to [12,12] of the data table MS to the area [1,5] to [3,7] in the destination matrix MD.

Last Update: 2013-Mar-26