Pascal词法分析程序
procedure TForm1.cmdCreateClick(Sender: TObject);
var
KeyInfo: KEY_INFO;
begin
KeyInfo.KeyName:='key_name_age';
KeyInfo.KeyType:=KEY_DUPLICATED;
KeyInfo.KeyFieldCount:=2;
KeyInfo.KeyFieldNo[0]:=1;
KeyInfo.KeyFieldCase[0]:=KEY_FIELD_CASE;
KeyInfo.KeyFieldPos[0]:=0;
KeyInfo.KeyFieldLen[0]:=32;
KeyInfo.KeyFieldNo[1]:=2;
if mCreateField('Number',FIELD_INTEGER)=1 then
if mCreateField('Name',FIELD_STRING,32)=1 then
if mCreateField('Age',FIELD_SMALLINT)=1 then
if mCreateField('Score',FIELD_DOUBLE)=1 then
if mCreateKey('Key_num',KEY_UNDUPLICATED,0)=1 then
if mCreateKey('Key_name',KEY_DUPLICATED,1)=1 then
if mCreateDB('test.sdb')=1 then
ShowMessage('Create DB Sucessfully');
end;
end.