Definition | #include <stdio.h> int flocate(FILE *fp, void *key, size_t keylen, int option);
| ||||||||||
Parameters | FILE *fp File pointer of an ISAM file opened in the mode "type=record,forg=key" (cf. void *key Pointer to an area containing the key value. size_t keylen Length of the key value. The value must not be zero. If keylen is less than the key length of the file, then int option This parameter may contain the following values defined in <stdio.h>:
| ||||||||||
Return val. | 0 | If the record with the specified key exists. | |||||||||
> 0 | If the record does not exist | ||||||||||
| If an error has occurred. | ||||||||||
Notes | If the call was error-free (return values 0 or > 0), the EOF flag of the file is reset. If the specified key value is not present in the file (return value > 0) the current position of the read/write pointer remains unchanged. Sole exception: if at the time of the In ISAM files with key duplication, | ||||||||||
See also | fdelrec, fgetpos, fgetpos64, fsetpos, fsetpos64, fopen, open64, freopen, freopen64 |