⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 de.~pas

📁 不完备信息的数据发现
💻 ~PAS
📖 第 1 页 / 共 2 页
字号:
  end;
  SetLength(DataVar_decision, 3);
  DataVar_decision[0] := good;
  DataVar_decision[1] := poor;
  DataVar_decision[2] := excel;

  SetLength(DataVar_good, 0);
  SetLength(DataVar_Poor, 0);
  SetLength(DataVar_Excel, 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_decision[0]);
        if wz <> 0 then m := m + 1;
      end;
      if m = lenth then
      begin
        SetLength(DataVar_good, Length(DataVar_good) + 1);
        DataVar_good[Length(DataVar_good) - 1] := IntToStr(j + 1);
        Memo6.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_decision[1]);
        if wz <> 0 then m := m + 1;
      end;
      if m = lenth then
      begin
        SetLength(DataVar_Poor, Length(DataVar_Poor) + 1);
        DataVar_Poor[Length(DataVar_Poor) - 1] := IntToStr(j + 1);
        Memo7.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_decision[2]);
        if wz <> 0 then m := m + 1;
      end;
      if m = lenth then
      begin
        SetLength(DataVar_Excel, Length(DataVar_Excel) + 1);
        DataVar_Excel[Length(DataVar_Excel) - 1] := IntToStr(j + 1);
        Memo8.Lines.Add(IntToStr(j + 1));
      end;
    end;
  end;

end;


procedure Tdef.Button3Click(Sender: TObject);
var t:double ;
begin
  t:=length(DataVar_good)/length(DataVar_good1) ;
  Memo12.Lines.Add(floattostr(t));
end;

procedure Tdef.Button4Click(Sender: TObject);
var t:double ;
begin
  t:=length(DataVar_poor)/length(DataVar_poor1) ;
  Memo13.Lines.Add(floattostr(t));
end;

procedure Tdef.Button5Click(Sender: TObject);
var t:double ;
begin
  t:=length(DataVar_excel)/length(DataVar_excel1) ;
  Memo14.Lines.Add(floattostr(t));

end;

procedure Tdef.Button6Click(Sender: TObject);
var p,t,l,m: integer ;
    str:string;
begin
  SetLength(DataVar_decisionex, 0);
  for i := 0 to 5 do
  begin
    SetLength(DataVar_decisionex, 6);
    lenth := Length(DataVar[i]);
    if lenth > 0 then
    begin
      for t := 1 to lenth do
      begin
        str_temp := Copy(DataVar[i], t, 1);
        for p:=0 to 2 do
        begin
        wz := PosEx(str_temp, DataVar_decision[p]);
        if wz <> 0 then
         begin
           m:=0;
           for l:=1 to length(DataVar_decisionex[i]) do
           begin
             str:=Copy(DataVar_decisionex[i],l,1);
             if IntToStr(p)<> str then m:=m+1;
           end;
            if m=length(DataVar_decisionex[i])
            then DataVar_decisionex[i] := DataVar_decisionex[i] +IntToStr(p);
         end;
           { if  p=0 then Memo15.Lines.Add('good');
             if  p=1 then Memo15.Lines.Add('poor');
             if  p=2 then Memo15.Lines.Add('excel');
        end; }
      end;
    end;
  end;
end;

 for i:=0 to 5 do
 Memo15.Lines.Add(DataVar_decisionex[i]);
end;



procedure Tdef.Button7Click(Sender: TObject);
begin
 SetLength(DataVar_decisionexx,4);
begin
lproductexf:=Tlproductexf.Create(nil);
  with lproductexf do
   try
    ShowModal;
   finally
    Free;
   end;
end;
 for i:=0 to 5 do
 begin
   if DataVar_decisionex[i]='0' then
   DataVar_decisionexx[0] := DataVar_decisionexx[0] +IntToStr(i+1);
   Memo16.Lines.Add(DataVar_decisionexx[0]);
   if DataVar_decisionex[i]='1' then
   DataVar_decisionexx[1] := DataVar_decisionexx[1] +IntToStr(i+1);
   Memo16.Lines.Add(DataVar_decisionexx[1]);
   if DataVar_decisionex[i]='02' then
   DataVar_decisionexx[2] := DataVar_decisionexx[2] +IntToStr(i+1);
   Memo16.Lines.Add(DataVar_decisionexx[2]);
   if DataVar_decisionex[i]='2' then
   DataVar_decisionexx[3] := DataVar_decisionexx[3] +IntToStr(i+1);
   Memo16.Lines.Add(DataVar_decisionexx[3]);
 end;

end;

procedure Tdef.Button8Click(Sender: TObject);
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[2]);
        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[2]);
        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
 if length(DataVar_Excel1ex)=0
  then Memo29.Lines.Add('0')
 else
  begin
  t:=length(DataVar_Excelex)/length(DataVar_Excel1ex) ;
  Memo29.Lines.Add(floattostr(t));
  end;
end;


initialization

finalization

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -