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



ScanForCatValues


Unit:SDL_datatable
Class: TDataTable
Declaration: function ScanForCatValues (ACol, LowRow, HighRow: longint; var OrdList: TIntArray): integer;

The method ScanForCatValues analyses the column ACol in the range from LowRow to HighRow for categorical values and returns an array of frequencies of the found values (variable parameter OrdList).

The array OrdList is an integer array with indices from 1 to DT_MAXNOMINALIDS. The function either returns -1 if the column ACol is not a categorical variable, or a positive number (including zero) indicating the number of invalid categorical values (i.e. the number of cells holding a value less than one or greater than DT_MAXNOMINALIDS).

Hint: Setting both LowRow and HighRow to zero defaults to the entire column.



Last Update: 2020-Feb-23