Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- db_VISTA III - d_reclast http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   D_RECLAST

SUMMARY
   d_reclast(REC[,dbn])
   int REC;
   int dbn;

ARGUMENTS
   REC         The record type for which  the first occurrence is to be
               returned

   dbn         (optional) The number of the database containing the record.

DESCRIPTION
   This function will find the last occurrence of record type REC on the data
   file which contains REC. It is used in conjunction with functions d_recprev
   and d_recnext to provide sequential record access capability. The records
   will be retrieved in database address order, skipping any deleted records
   or records of a different type. Thus d_reclast will return the REC
   occurrence with the highest database address.

CURRENCY CHANGES
   curr_rec=record found;

RETURN CODES

   -2     S_NOTFOUND    NO occurrences of REC in the database

   -3     S_INVREC      Invalid record type specified. Perhaps you passed
                        a set or field type instead.

EXAMPLE

    int info_total;
    ...
    /*Compute total number of info records in database*/
    for (info_total=0,d_reclast(INFO);
         db_status == S_OKAY;d_recprev(INFO))
       ++info_total;
    print ("total of %d info records in database\n",info_total);

See Also: d_recprev d_recnext d_recset d_recfrst

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson