idlastro / Database Procedures: DBFIND_SORT

[Source code]

NAME
DBFIND_SORT   
PURPOSE
Subroutine of DBFIND to perform a search using sorted values 
EXPLANATION
This is a subroutine of dbfind and is not a standalone procedure
It is used to limit the search using sorted values  
CALLING SEQUENCE
dbfind_sort, it, type, svals, list, [/FULLSTRING, COUNT = ]
INPUT
it - item number, scalar
type - type of search (output from dbfparse)
svals - search values (output from dbfparse)
INPUT/OUTPUT
list - found entries
OPTIONAL INPUT KEYWORD
/FULLSTRING - By default, one has a match if a search string is 
        included in any part of a database value (substring match).   
        But if /FULLSTRING is set, then all characters in the database
        value must match the search string (excluding leading and 
        trailing blanks).    Both types of string searches are case
        insensitive.
OPTIONAL OUTPUT KEYWORD
Count - Integer scalar giving the number of matches found
SYSTEM VARIABLES
The obsolete system variable !err is set to number of good values
!ERR = -2 for an invalid search
PROCEDURES CALLED
DB_INFO(), DB_ITEM_INFO(), DBSEARCH() 
REVISION HISTORY
D. Lindler  July,1987
William Thompson, GSFC/CDS (ARC), 30 May 1994
        Added support for external (IEEE) data format
William Thompson, GSFC, 14 March 1995 Added keyword FULLSTRING
Minimize use of obsolete !ERR variable   W. Landsman  February 2000
Added COUNT keyword, deprecate !ERR W. Landsman  March 2000
Use 64 bit integers V5.2 or later
Include new IDL unsigned & 64 bit integer datatypes W.Landsman July 2001
Make sure returned list vector is LONG  W. Landsman August 2001
Work on string items   W. Landsman November 2009
Don't use VALUE_LOCATE on a single value  W. Landsman November 2009
Use VALUE_LOCATE even for equal values W. Landsman December 2009
Fix bug allowing negative FIRST values, William Thompson, 10 May 2010