我没有用中文括号,前面的代码非常多,但是去掉出错的部分其他部分可编译通过。
ap:=TStringlist.Create;
Session.GetAliasNames(ap); {È¡µÃ±ðÃûÁбí}
if (ap.IndexOf(Style+'rslt') = -1) then begin { ±ðÃû²»´æÔÚ }
{ ½¨Á¢±ðÃû }
AParams := TStringList.Create;
Session.GetAliasParams('Aro',AParams);
dir := Copy(AParams.Strings[0],6,255)+'/'+Style;
// dirbak := GetCurrentDir;
// {$I-}
// ChDir(dir);
// if IOResult <> 0 then
// MkDir(dir);
// ChDir(dirbak);
MkDir(dir+'/'+'rslt');
Session.AddStandardAlias(Style+'rslt',dir+'/rslt','Paradox');
Session.SaveConfigFile;
{ &frac12;¨&Aacute;&cent;&Ecirc;&yacute;&frac34;&Yacute;±íresult.db }
with Table1 do begin
Active := False;
DatabaseName := Style+'rslt';
TableType := ttParadox;
TableName := 'result.db';
with FieldDefs do begin
Clear;
with AddFieldDef do begin
Name := '&raquo;ú&Atilde;&ocirc;&ETH;&Ocirc;&acute;ú&Acirc;&euml;';
DataType := ftInteger;
end;
with AddFieldDef do begin
Name := '&sup3;&otilde;&Ecirc;&frac14;&cedil;&szlig;&para;&Egrave;';
DataType := ftFloat;
end;
with AddFieldDef do begin
Name := '&sup3;&otilde;&Ecirc;&frac14;&Acirc;í&ordm;&Otilde;&Ecirc;&yacute;';
DataType := ftFloat;
end;
with AddFieldDef do begin
Name := '&Oacute;°&Iuml;ì&sup2;&Icirc;&Ecirc;&yacute;&Ouml;&micro;';
DataType := ftFloat;
end;
with AddFieldDef do begin
Name := '&frac12;á&sup1;&ucirc;&sup2;&Icirc;&Ecirc;&yacute;1';
DataType := ftFloat;
end;
with AddFieldDef do begin
Name := '&frac12;á&sup1;&ucirc;&sup2;&Icirc;&Ecirc;&yacute;2';
DataType := ftFloat;
end;
with AddFieldDef do begin
Name := '&Ecirc;&yacute;&frac34;&Yacute;±í&Atilde;&ucirc;';
DataType := ftString;
Size := 15;
end;
with AddFieldDef do begin
Name := '&Oacute;°&Iuml;ì&sup2;&Icirc;&Ecirc;&yacute;&Atilde;&ucirc;';
DataType := ftString;
Size := 4;
end;
end;
CreateTable;
end;
end;
{ &para;&Aacute;&Ecirc;&yacute;&frac34;&Yacute;&Icirc;&Auml;&frac14;&thorn;result_1.dat&Egrave;&euml;&iquest;&acirc;&pound;&not;×÷&Icirc;&ordf;&frac12;á&sup1;&ucirc;&sup2;&Icirc;&Ecirc;&yacute;1&iexcl;&cent;2&Ouml;&ETH;&micro;&Auml;&Ouml;&micro; }
with Query1 do begin
Close;
SQL.Clear;
SQL.Add(Format('Select * from result.db where &raquo;ú&Atilde;&ocirc;&ETH;&Ocirc;&acute;ú&Acirc;&euml;=%d and &sup3;&otilde;&Ecirc;&frac14;&cedil;&szlig;&para;&Egrave;=%f and &sup3;&otilde;&Ecirc;&frac14;&Acirc;í&ordm;&Otilde;&Ecirc;&yacute;=%f',[Jmxdm,Height,mah]));
Open;
if Fields[0].AsString <> '' then begin { &frac12;á&sup1;&ucirc;&Ograve;&Ntilde;&acute;&aelig;&Ocirc;&Uacute; }
if MessageDlg('&frac12;á&sup1;&ucirc;&Ograve;&Ntilde;&acute;&aelig;&Ocirc;&Uacute;&pound;&not;&Ecirc;&Ccedil;·&ntilde;&cedil;&sup2;&cedil;&Ccedil;&pound;&iquest;',mtInformation,[mbYes,mbNO],0)=mrNo then begin
Exit; { &sup2;&raquo;&cedil;&sup2;&cedil;&Ccedil;&pound;&not;&Iacute;&Euml;&sup3;&ouml; }
end
else begin
{ &cedil;&sup2;&cedil;&Ccedil;&Ograve;&Ntilde;&acute;&aelig;&Ocirc;&Uacute;&Ecirc;&yacute;&frac34;&Yacute; }
Edit;
FieldValues['&Oacute;°&Iuml;ì&sup2;&Icirc;&Ecirc;&yacute;&Ouml;&micro;'] := StrToFloat(Edit1.Text);
FieldValues['&Oacute;°&Iuml;ì&sup2;&Icirc;&Ecirc;&yacute;&Atilde;&ucirc;'] := IEComboBox1.Text;
datafilename := Fields[6].AsString;
AssignFile(F, GetCurrentDir+'/datafile/'+'result_2.txt');
Reset(F);
Read(F,data);
FieldValues['&frac12;á&sup1;&ucirc;&sup2;&Icirc;&Ecirc;&yacute;1'] := data;
Read(f,data);
FieldValues['&frac12;á&sup1;&ucirc;&sup2;&Icirc;&Ecirc;&yacute;2'] := data;
Post;
CloseFile(F);
end;
end
else begin
{ &frac12;á&sup1;&ucirc;&sup2;&raquo;&acute;&aelig;&Ocirc;&Uacute;&pound;&not;&Egrave;&euml;&iquest;&acirc; }
with Table1 do begin
Active := False;
DataBaseName := Style+'rslt';
TableType := ttParadox;
TableName := 'result.db';
Active := True;
Edit;
Append;
FieldValues['&raquo;ú&Atilde;&ocirc;&ETH;&Ocirc;&acute;ú&Acirc;&euml;'] := Jmxdm;
FieldValues['&sup3;&otilde;&Ecirc;&frac14;&cedil;&szlig;&para;&Egrave;'] := Height;
FieldValues['&sup3;&otilde;&Ecirc;&frac14;&Acirc;í&ordm;&Otilde;&Ecirc;&yacute;'] := mah;
FieldValues['&Oacute;°&Iuml;ì&sup2;&Icirc;&Ecirc;&yacute;&Ouml;&micro;'] := StrToFloat(Edit1.Text);
FieldValues['&Oacute;°&Iuml;ì&sup2;&Icirc;&Ecirc;&yacute;&Atilde;&ucirc;'] := IEComboBox1.Text;
FieldValues['&Ecirc;&yacute;&frac34;&Yacute;±í&Atilde;&ucirc;'] := Format('t%d.db',[Recordcount]);
datafilename := Format('t%d.db',[Recordcount]);
AssignFile(F, GetCurrentDir+'/datafile/'+'result_2.txt');
Reset(F);
Read(F,data);
FieldValues['&frac12;á&sup1;&ucirc;&sup2;&Icirc;&Ecirc;&yacute;1'] := data;
Read(f,data);
FieldValues['&frac12;á&sup1;&ucirc;&sup2;&Icirc;&Ecirc;&yacute;2'] := data;
Post;
CloseFile(F);
end;
end;
end;
{ &para;&Aacute;&Ecirc;&yacute;&frac34;&Yacute;&Icirc;&Auml;&frac14;&thorn;result_2.dat&Egrave;&euml;&iquest;&acirc;&pound;&not;×÷&Icirc;&ordf;&Ecirc;&yacute;&frac34;&Yacute;±í&micro;&Auml;&frac14;&Ccedil;&Acirc;&frac14;&Auml;&Uacute;&Egrave;&Yacute; }
with Table1 do begin
Active := False;
DatabaseName := Style+'rslt';
TableType := ttParadox;
TableName := datafilename;
AssignFile(F, GetCurrentDir+'/datafile/'+'result_1.dat');
Reset(F);
Readln(F,str);
{ &frac12;¨&Aacute;&cent;±í&frac12;á&sup1;&sup1; }
with FieldDefs do begin
Clear;
i := 1;
for j := 1 to 10 do begin
fieldn := '';
c := str;
while (c = ' ') or (c = #9) do begin
i := i+1;
c := str;
end;
while (c > 'A') and (c < 'Z') do begin
fieldn := fieldn + c;
i := i+1;
// c := str;
end;
with AddFieldDef do begin
Name := fieldn;
DataType := ftFloat;
end;
end;
end;
CreateTable;
{ &frac14;&Oacute;&Egrave;&euml;&Ecirc;&yacute;&frac34;&Yacute; }
Active := True;
while not Eof(F) do begin
Edit;
Append;
for j := 1 to 10 do begin
Read(F,data);
FieldValues[Fields[i-1].FieldName] := data;
end;
Post;
Readln(F);
end;
CloseFile(F);
end;