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_recfrst http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   D_RECFRST

SUMMARY
   d_recfrst(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 first occurrence of record type REC on the data
   file which contains REC. It is used in conjunction with functions d_recnext
   and d_recprev 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_recfrst will return the REC
   occurrence with the lowest 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_recfrst(INFO);
         db_status == S_OKAY;d_recnext())
       ++info_total;
    print ("total of %d info records in database\n",info_total);

See Also: d_reclast d_recset d_recprev d_recnext

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