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



SliceCol


Unit:SDL_datatable
Class: TDataTable
Declaration: function SliceCol (Col, FirstRow, LastRow, Step: integer; var DstVec: TDoubleArray): integer;

The function SliceCol extracts a data slice from the column Col. The data slice is created by copying all elements of the column Col between (and including) the rows FirstRow and LastRow. The parameter Step controls the distance between the individual elements. The resulting data slice is returned in the open array DstVec. Please note, that DstVec is automatically resized to the number of extracted elements.

The function returns the following codes:

>0 ... everything is OK, the returned value reflects the number of elements in DstVec
-1 ... invalid Col parameter
-2 ... FirstRow and/or LastRow is out of range
-3 ... invalid Step parameter (≤0)



Last Update: 2023-Dec-14