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



CopyDataColumnFromArray


Unit:SDL_datatable
Class: TDataTable
Declaration: function CopyDataColumnFromArray (Col: integer; SrcArray: TDoubleArray): integer;

The function CopyDataColumnFromArray copies the numeric data contained in ScrArray into the column Col. If the length of the vector SrcArray is less than the number of rows only the first values of column Col are filled, the remaining cells are left unchanged. If the length of the source vector is greater than the number of rows then only the first NrOfRows values are copied, the rest is ignored.

The function returns the following error codes:

 0 ... everything is OK, data has been copied
-1 ... invalid parameter Col (valid range is 1..NrOfColumns)

Hint: Please note that the method CopyDataFromArray is more flexible as it supports partial copying.



Last Update: 2023-Dec-14