Synopsis:
rec_num=db_prev([exact_flag])
Arguments:
[exact_flag] - Optional argument whcih can be set to non-zero value if an exact match is required
Description: This function will move the index pointer to the previous key in the index and return the record number of the corresponding record in the database table. A call to db_first() must have previously been made to start the search and set the initial position of the index pointer. If the call to db_next() causes the index pointer to move to before the first key of the index then the function will return 0.
If the optional exact_flag argumment is set to a non-zero value then the function will only return a record number for a record that matches exactly the search_term speacified in the db_first() call. As soon as a key is encountered that does not match the search_term specified in the db_first() call then the function will return 0.
Returns: Returns the record number of the previous key pointed to by the index pointer (set up previously be a call to db_first()) or returns 0 if the index pointer has moved prior to the start of the index .
if exact_match is set and the next key value does not match the search_term specified by db_first() the function will return also 0.
If a previous call to db_first() has not been made then the function will return a negative error code.