Daylight v4.9
Release Date: 1 February 2008


dt_mer_numsearch - initiate a numeric search

Generic Prototype

dt_mer_numsearch(dt_Handle, dt_Handle, dt_Integer, dt_Integer, dt_Integer)
=> dt_Integer

C Prototype

#include "dt_merlin.h"

dt_Integer dt_mer_numsearch(dt_Handle hitlist, dt_Handle column, dt_Integer action, dt_Integer find_next, dt_Integer *status, dt_Real value1, dt_Real value2)

FORTRAN Prototype

include ''

integer*4 dt_f_mer_numsearch(hitlist, column, action, find_next, status, value1, value2)

integer*4 hitlist
integer*4 column
integer*4 action
integer*4 find_next
integer*4 status
real*4 value1
real*4 value2


Begins a numeric search task on the server.

The hitlist 'hitlist' specifies where the resulting hits will be placed and, depending on the value of 'action', may specify the subset of the database to be searched.

The 'column' specifies the data to be searched.

The 'action' specifies how the results of the search are to be combined with the original hitlist, as follows:


The original hitlist is discarded. The entire pool is searched. All rows which meet the criteria are included in the resulting hitlist.
All rows not on the original list are searched and hits are added to the current list.
All rows not on the original list are searched and non-hits are added to the current list.
The original hitlist is searched and hits are removed from the hitlist.
The original hitlist is searched and non-hits are removed from the hitlist.
The original hitlist is searched and as soon as a hit is found, its hitlist index is returned. The hitlist is unchanged. Data in derived columns is modified, even though the hitlist is unchanged. The parameter find_next indicates where the position in the hitlist where the search is to begin. The first row examined is 'find_next' + 1.
Like DX_ACTION_NEXT_HIT, except finds the next row which does not match the search criteria.
The parameter 'find_next' specifies where in the hitlist the search is to begin when the action is either DX_ACTION_NEXT_HIT or DX_ACTION_NEXT_NONHIT. A value of -1 indicates that the search should begin at the beginning of the hitlist. To continue a search from a previously-found hit, specify that hit's index (the value returned by the previous call to the search).

The values of 'value1' and 'value2' specify a search for numbers within the range from 'value1' to 'value2'. There is no separate exact search for numbers; for this case, search with the two values equal.

Return Value

The status of the search task is returned in 'status' (see dt_continue(3) for descriptions). If the hitlist is short enough that time-slicing is not required, the value of 'status' will be DX_STATUS_DONE. Otherwise, the status will be DX_STATUS_IN_PROGRESS and dt_continue(3) will be required to finish the task.

The return value is the progress on the task (see dt_done_when(3)) or -2 if an error is encountered.

Related Topics

dt_abort(3) dt_continue(3) dt_done_when(3) dt_mer_nsearches(3)