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 scdicreate(
           char *filename,
           int keytype,
           char *keyexpr,
           int keylen );

PROTOTYPE IN
   sc_base.h

DESCRIPTION
   scdicreate creates an index file. keyexpr will be translated to
   all upper case when the index file is created.

   If keytype is SC_CKEY, then keyexpr must be an ASCIIZ string
   consisting of one or more field names from the data record. All fields
   included in the expression must be of type 'c' or be translated into type
   'c'. No check is made to verify this. keyexpr cannot be longer that
   220 characters. keylen cannot exceed 100.

   If keytype is SC_DKEY or SC_NKEY, then keyexpr should
   consist of only one data field. keylen will automatically be set to 8
   (numeric and date keys are stored as modified doubles).

   If keytype is SC_LKEY, then keyexpr should consist of only one
   data field. keylen will automatically be set to 1 (logical keys are
   stored as characters).

   When unique keys are required, OR SC_UNIQUE with keytype.

NOTES
   scdicreate will create a new index file even if one had already
   existed.

   keyexpr is not checked for validity during the file creation
   process. Currently only the scdikmake function uses keyexpr.

EXAMPLE

   #include <sc_base.h>

   void main()
   {
     scdinit(20,0);

     scdicreate("TOCDATE.IDX",SC_CKEY,"dtoc(date) + time",16);
     scdterm();
   }

See Also: scdikmake

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