基本信息
源码名称:Delphi条件个数不定的判断
源码大小:0.25M
文件格式:.zip
开发语言:Pascal
更新时间:2020-10-07
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍
Delphi条件个数不定的判断

var
  Bln:boolean;
  p:byte;
  Arr:array of string;
  TS:Tstringlist;
  TJStr,TJVal,tmp,sname:string;
begin
  meo.Clear;
  rcount:=grid.RowCount;

  ts:=tstringlist.Create;
  ncount:=checklist.Items.Count;
  for n:= 0 to nCount-1 do
    begin
      if checklist.Checked[n]=true then
        ts.Add(checklist.Items.Strings[n]);
    end;
  ncount:=ts.count;
  if ncount=0 then exit;

  meo.Lines.Add('符合条件的如下:');
  setlength(arr,ncount);
  for n:= low(arr) to high(arr) do
    arr[n]:=ts[n];

  for r:=1 to rcount-1 do
    begin
      bln:=true;
      for n:= low(arr) to high(arr) do
        begin
          tmp:=arr[n];
          p:=pos('=',tmp);
          TJStr:=copy(tmp,1,p-1);
          if TJStr='技术' then
            f:=2
          else if TJStr='种类' then
            f:=3
          else if TJStr='级别' then
            f:=4
          else if TJStr='派系' then
            f:=5;
          TJVal:=copy(tmp,p 1,length(tmp)-p);
          if trim(grid.Cells[f,r])<>TJVal then
            begin
              bln:=false;
              break;
            end;
        end;
      if bln=true then
        meo.Lines.Append('    ' grid.Cells[1,r]);
  end;

  meo.Refresh;