📄 deex.pas
字号:
unit deex;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm2 = class(TForm)
Button6: TButton;
Memo15: TMemo;
Button7: TButton;
Memo16: TMemo;
Memo27: TMemo;
Memo28: TMemo;
Memo29: TMemo;
Button10: TButton;
Button11: TButton;
Button12: TButton;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Button8: TButton;
Memo17: TMemo;
Memo18: TMemo;
Memo19: TMemo;
Button9: TButton;
Memo24: TMemo;
Memo25: TMemo;
Memo26: TMemo;
procedure Button8Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button9Click(Sender: TObject);
procedure Button10Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Button8Click(Sender: TObject);
begin
begin
SetLength(DataVar_goodex, 0);
SetLength(DataVar_Poorex, 0);
SetLength(DataVar_Excelex, 0);
for j := 0 to 5 do
begin
m := 0;
lenth := Length(DataVar[j]);
if lenth > 0 then
begin
for i := 1 to lenth do
begin
str_temp := Copy(DataVar[j], i, 1);
wz := PosEx(str_temp, DataVar_decisionexx[0]);
if wz <> 0 then m := m + 1;
end;
if m = lenth then
begin
SetLength(DataVar_goodex, Length(DataVar_goodex) + 1);
DataVar_goodex[Length(DataVar_goodex) - 1] := IntToStr(j + 1);
Memo17.Lines.Add(IntToStr(j + 1));
end;
end;
end;
for j := 0 to 5 do
begin
m := 0;
lenth := Length(DataVar[j]);
if lenth > 0 then
begin
for i := 1 to lenth do
begin
str_temp := Copy(DataVar[j], i, 1);
wz := PosEx(str_temp, DataVar_decisionexx[1]);
if wz <> 0 then m := m + 1;
end;
if m = lenth then
begin
SetLength(DataVar_Poorex, Length(DataVar_Poorex) + 1);
DataVar_Poorex[Length(DataVar_Poorex) - 1] := IntToStr(j + 1);
Memo18.Lines.Add(IntToStr(j + 1));
end;
end;
end;
for j := 0 to 5 do
begin
m := 0;
lenth := Length(DataVar[j]);
if lenth > 0 then
begin
for i := 1 to lenth do
begin
str_temp := Copy(DataVar[j], i, 1);
wz := PosEx(str_temp, DataVar_decisionexx[4]);
if wz <> 0 then m := m + 1;
end;
if m = lenth then
begin
SetLength(DataVar_Excelex, Length(DataVar_Excelex) + 1);
DataVar_Excelex[Length(DataVar_Excelex) - 1] := IntToStr(j + 1);
Memo19.Lines.Add(IntToStr(j + 1));
end;
end;
end;
end;
procedure Tdef.Button9Click(Sender: TObject);
begin
SetLength(DataVar_good1ex, 0);
SetLength(DataVar_Poor1ex, 0);
SetLength(DataVar_Excel1ex, 0);
for j := 0 to 5 do
begin
lenth := Length(DataVar[j]);
if lenth > 0 then
begin
for i := 1 to lenth do
begin
str_temp := Copy(DataVar[j], i, 1);
wz := PosEx(str_temp, DataVar_decisionexx[0]);
if wz <> 0 then
begin
SetLength(DataVar_good1ex, Length(DataVar_good1ex) + 1);
DataVar_good1ex[Length(DataVar_good1ex) - 1] := IntToStr(j + 1);
Memo24.Lines.Add(IntToStr(j + 1));
break;
end;
end;
end;
end;
for j := 0 to 5 do
begin
lenth := Length(DataVar[j]);
if lenth > 0 then
begin
for i := 1 to lenth do
begin
str_temp := Copy(DataVar[j], i, 1);
wz := PosEx(str_temp, DataVar_decisionexx[1]);
if wz <> 0 then
begin
SetLength(DataVar_Poor1ex, Length(DataVar_Poor1ex) + 1);
DataVar_Poor1ex[Length(DataVar_Poor1ex) - 1] := IntToStr(j + 1);
Memo25.Lines.Add(IntToStr(j + 1));
break;
end;
end;
end;
end;
for j := 0 to 5 do
begin
lenth := Length(DataVar[j]);
if lenth > 0 then
begin
for i := 1 to lenth do
begin
str_temp := Copy(DataVar[j], i, 1);
wz := PosEx(str_temp, DataVar_decisionexx[4]);
if wz <> 0 then
begin
SetLength(DataVar_excel1ex, Length(DataVar_excel1ex) + 1);
DataVar_excel1ex[Length(DataVar_excel1ex) - 1] := IntToStr(j + 1);
Memo26.Lines.Add(IntToStr(j + 1));
break;
end;
end;
end;
end;
end;
procedure Tdef.Button10Click(Sender: TObject);
var t:double ;
begin
t:=length(DataVar_goodex)/length(DataVar_good1ex) ;
Memo27.Lines.Add(floattostr(t));
end;
procedure Tdef.Button11Click(Sender: TObject);
var t:double ;
begin
t:=length(DataVar_Poorex)/length(DataVar_Poor1ex) ;
Memo28.Lines.Add(floattostr(t));
end;
procedure Tdef.Button12Click(Sender: TObject);
var t:double ;
begin
t:=length(DataVar_Excelex)/length(DataVar_Excel1ex) ;
Memo29.Lines.Add(floattostr(t));
end;
initialization
finalization
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -