|
Purpose |
Initialises the memory workfile | |
|
Syntax |
void mem_describe(type_nr, key_size) | |
|
Parameters |
int type_nr |
Table number of records to be used in work file |
|
|
int key_size |
Size of key of table. The key is assumed to be at the beginning of the record |
|
Description |
The DP4 memory work file function mem_describe() allows data records to be stored and retrieved from a work file. Each table used has its own work file, and this function must be called on each table to initialise the operation. Another set of workfile functions are available which allow you to access records in a workfile file with an index. See the function wkf_open(). The parameter key_size used to differentiate between records in the workfile is assumed to be at the beginning of the record. You cannot use mem_describe() with database records where the key fields are spread throughout the record. To use the memory workfile functions, follow the steps below: 1. Call the function mem_describe() to define the table and key size 2. Call the function mem_post() to post records to the workfile 3. Call the function mem_find() to fetch records with a specified key from the work file You can define your own tables, but use type numbers greater than 4096. You cannot delete records from the workfile. | |
|
See also |
||