Declaration: |
TDataTable.CopyFrom (ExtTab: TDataTable; SourceColLo, SourceRowLo, SourceColHi, SourceRowHi, DestCol, DestRow: integer); |
The method CopyFrom copies a part of the table 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. |
|