
59
search_fieldno, int recordno, int get_field_no, char* F_Buffer, int
flag);
Example call
:
char str[8]=”abcdefg”,str_buffer[60];
SearchField_GF(&fsearch, str,0,0,1,str_buffer,FORWARD);
Includes
:
#include “DBMS.h”
Search the correctly appointed field. After search success,
acquiring another appointed field which including record of this
field.
Several describe the argument as follows:
argument description
_DBMS* F_Search
The file’s searching structure that has
been initialized.
char* field
String data wanted to match.
int search_fieldno
Field wanted to search.
int recordno
Begin to search from which data.
int get_field_no
After contrasting success, acquiring the
data of appointed field in this record.
char* R_Buffer
After contrast success, it will write
record which included this field into
buffer.
Description
:
int flag
FORWARD => Search form forward to
backward
BACKWARD => Search form
backward to forward
As success of searching, the file index
will stay in successful record front.
When search defeat, the file index will
not be moved (not support
BACKWARD at present).
Returns
:
When “R _ Buffer = NULL”, pass back – 1: Search defeat; Pass
other value back: That is the size of space for buffer.
When “R _ Buffer
≠
NULL”, pass back – 1: Search defeat; Pass
other value back: That is the record position which conform to
contrast data.
SeekRecord
Purpose
:
Move the searching index to the appointed record.
Syntax
:
long SeekRecord(_DBMS* F_Search,int recordno);
Example call
:
SeekRecord(&fsearch,10);//move
file index to eleventh record
。
Содержание PT-10
Страница 4: ...3 Keyboard Wedge 99 System 101 Power 102 Other 102 ...
Страница 13: ...12 6 Development Flow Chart ...
Страница 53: ...52 Returns No returns Notes ...