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



SliceRow


Unit:SDL_datatable
Class: TDataTable
Declaration: function SliceRow (Row, FirstCol, LastCol, Step: integer; var DstVec: TDoubleArray): integer;

The function SliceRow extracts a data slice from the row Row. The data slice is created by copying all elements of the row Row between (and including) the columns FirstCol and LastCol. 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 Row parameter
-2 ... FirstCol and/or LastCol is out of range
-3 ... invalid Step parameter (≤0)


Last Update: 2023-Dec-14