Index Searching


Index FiND

The main reason for sorting files with indexes is that it allows for very fast searching on the field of the first sort level.

This routine needs a 'special' parameter, which has to be of the type defined by the first sort level. It returns the indexid of the first record which equals the given item which has to be found. Subsequent records with the same value can be found with the NEXTrec command.

Sbasic
    record = indexFIND(#bufferid, item)
    item : 'special'
Assembler
    IFND
    bufferid
    'special' item to find
    return long recordid
C
    long DDindexfind(long bufferid, char *special[8], long *return);
  
errors, code,   meaning
itnf    -7      invalid bufferid
                or not found (return=-1)
PROGS, Professional & Graphical Software
last edited September 6, 1996