Ini_searchadv – Argox PA-20 Programming Guide User Manual

Page 57

Advertising
background image

PT-20 Programming Guide

55

unsigned char *pusFielddlt

This argument has two kinds of meanings.

When record _ Type is 0, search for regular

length. This function needs to insert the

unsigned char array; the array represents

the length of every field.

When record _ Type is1, search for

variable length, this function need to insert

one character to represent separate

symbol.

int record_type

When record _ Type is 0, search for regular

length. It has no separate symbols among

field and field.

When record _ Type is 1, search for

variable length. It needs a separate symbol

among field and field.

int record_length

This argument is each record’s length.

When record _ Type is 0, need to insert this

value, not including the symbol of line feed.

When record _ Type is 1, this field can

insert any value.

int total_field_no

This argument is the field’s quantity of each

record.

int total_record_no

Total amount of records in the file. If does

not know the total amount, you can insert -

1, that will calculate automatically by the

system.

Returns: 0: Initialize defeat.

1: Initialize success.

Ini_SearchAdv

Purpose:

Use “Ini_SearchAdv” can initiate the advance file search function in disk

Syntax: int Ini_SearchAdv(_TFILE* filehd,_DBMS* F_Search, unsigned char

*pusFielddlt, unsigned char*pusKeyIdx, int slKeyField_Num, int

record_type, int record_length, int total_field_no, int total_record_no);

Example call: Example 1: Variable field length

_DBMS fsearch;

_TFILE *filepoint;

unsigned char ausFielddlt

[2]=”,”;

Advertising