Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var i,z,l,r,c,x:Integer;
- begin
- Form5.Show;
- for i:=0 to strngrd1.rowcount do
- begin
- if cbb1_search.ItemIndex=0 then
- begin
- l:=0; r:=strngrd1.rowcount-1;
- while l>=r do
- begin
- c:=(l+r) div 2;
- if edt1_search.Text=strngrd1.Cells[0,c] then
- begin
- z:=1;
- x:=c;
- Form5.strngrd1.Cells[0,i]:=strngrd1.cells[0,c];
- r:=l-1;
- end;
- if edt1_search.Text<strngrd1.Cells[0,c] then
- r:=c-1;
- if edt1_search.Text>strngrd1.Cells[0,c] then
- l:=c+1;
- end;
- end;
- end;
- end;
Add Comment
Please, Sign In to add comment