Enscribe Programmer's Guide

C Action of Current Key, Key Specifier, and Key Length
This appendix contains pseudocode descriptions of the behavior of basic file-system operations
and their relationships to file-currency information. The variables and functions used in the
pseudocode are defined first. By evaluating the pseudocode, you can determine the action of the
current key, key specifier, and key length for the different file-system operations.
Variable Definitions
These variables are used in the pseudocode descriptions:
CKV
current key value
CKS
current key specifier
CKL
current key length
CMPL
comparison length
MODE
positioning mode : (approximate = 0, generic = 1, exact = 2)
REVERSE
indicates whether the descending direction is to be used
primary
0
next
true if the next record in sequence is to be the reference
rip
relative file insertion pointer
present
true if parameter is supplied
keyseq
file type 3 (key-sequenced and queue files)
entryseq
file type 2
relative
file type 1
Function Definitions
These functions are used in the pseudocode descriptions:
keyfield (record, specifier)
returns the value of the “specified” key field in the record. If the file is not key-sequenced and
specifier = 0, then a record number or record address is returned.
keylength (record, specifier)
returns the length of the specified” key field in the record. If record = 0, this returns the defined
key-field length.
180 Action of Current Key, Key Specifier, and Key Length