Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SoftC Database Library v2.1 Guide - usage http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
USAGE
   int scdckprev(
           int handle,
           void *key,
           long *recno );

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scdckprev will decrement the key pointer and return the key value
   key and data record number recno associated with the new current
   key.

   If scdckprev is called immediately after opening the index file the last
   logical key will be returned.

NOTES
   The user must ensure that the buffer used to return the key is large
   enough to hold the entire key. The maximum length of the key can be
   determined via a call to scdcinfo.

   All keys are returned as strings.

EXAMPLE
   #include <stdio.h>
   #include <softc.h>
   #include <sc_base.h>

   void main()
   {
     int ntx;
     char character[65];
     long recno;

     scdinit(20,0);
     if (scdcopenx(&ntx,"TOCNAME.NTX",SC_BUFFER) == SC_SUCCESS) {
       scdckprev(ntx,character,&recno);    /* get last key */
       printf("%s %ld\n",character,recno);
       scdcclose(ntx);
     }
     scdterm();
   }

See Also: scdcinfo

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