[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
USAGE
signed int scdicreate(
signed char *filename,
signed int keytype,
signed char *keyexpr,
signed 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
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson