本人做的系统有问题,而且解决了很久都不行,如有谁能在明天晚上之前帮我彻底解决了,我以100元钱酬谢他(她),是高手的并切愿意帮助小女子解决的,请跟进,我会和你留下联系方式,以汇款!

解决方案 »

  1.   

    是的,算法我都写出来了,只是因为对delphi 基础知识不熟悉,导致系统不能完成
      

  2.   

    function  TFrmChoose.Gen_Frequence1(minsup:real;tiao:integer):TAStr; 
    var 
      i :integer; 
      mstrSQL:string; 
      B:TAStr; 
      candidate1:TAStr; 
      Large1:TAStr;   jilu:TAInt;  //储存侯选项的频度 
      k:integer; 
      q:integer; 
      n:integer;   mstr1:string; 
      mstr2:string;   numchushi:integer; 
    begin 
      i := 0; 
      setlength(B,LONGARRAY); 
      setlength(candidate1,LONGARRAY); 
      FillChar(candidate1[0],length(candidate1),chr(49));//初始化 
      FillChar(Large1[0],length(Large1),chr(49));//初始化 
    glagGen:=true; 
      try 
        try 
            ADOQuery1:=tadoquery.create(self); 
            ADOQuery1.Connection:=DMDAL.ADOCn; 
            with Adoquery1  do 
              begin 
                close; 
                sql.clear; 
                sql.add('select * from product'); 
                Prepared; 
                open; 
                while not eof do 
                    begin 
                      B[i] := fieldbyname('productname').asstring; 
                      next ; 
                      i := i+1; 
                      
                    end; 
                end; 
            except 
              //出错 
              on E:Exception do 
                ShowMessage(E.Message); 
          end; 
        finally 
        end;   k:=0; //  candidate1 := Copy (B, 0,LONGARRAY); 
        for n:=low(B) to high(B) do 
        begin           if pos('w',B[n])=1 then //女装类商品 
            // if copy(B[n],1,1)='w' then 
                begin 
                  k:=k+1; 
                  candidate1[k-1]:=B[n];编译不了,candidate1[k-1]是个无效的值 
                end; 
              if pos('d',B[n])=1 then  //日用品类商品 
                    begin 
                      k:=k+1; 
                      candidate1[k-1]:=B[n]; 
                    end; 
          end;        //其它类商品 
    发现candidate[]数组没有被赋值