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



CopyDataToMatrix


Unit:SDL_datatable
Class: TDataTable
Declaration: function CopyDataToMatrix (Dest: TMatrix; SrcColLo, SrcRowLo, SrcColHi, SrcRowHi, DestCol, DestRow: integer): integer;

The method CopyDataToMatrix copies the cells of the data table in the range from [SrcColLo,SrcRowLo] to [SrcColHi,SrcRowHi] to the position [DestCol, DestRow] of the matrix Dest. If any of the cells to be copied fall outside of the destination range these cells are ignored.

The function returns the following error codes:
 0 ... everything is OK
-1 ... the destination matrix is not instantiated
-2 ... SrcColLo and/or SrcColHi are out of range (valid range: 1 to NrOfColumns)
-3 ... SrcRowLo and/or SrcRowHi are out of range (valid range: 1 to NrOfRows)
-4 ... DestCol and/or DestRow are out of range (valid ranges: 1 ≤ DestColDest.NrofColumns), and 1 ≤ DestRowDest.NrofRows)

 

Hint: As a shortcut, setting both the ...Lo and the ...Hi parameters to zero is equal to processing the entire range of available source columns or rows.



Last Update: 2023-Dec-14