Guest User

Untitled

a guest
Jun 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. var i,z,l,r,c,x:Integer;
  2. begin
  3. Form5.Show;
  4. for i:=0 to strngrd1.rowcount do
  5. begin
  6. if cbb1_search.ItemIndex=0 then
  7. begin
  8. l:=0; r:=strngrd1.rowcount-1;
  9. while l>=r do
  10. begin
  11. c:=(l+r) div 2;
  12. if edt1_search.Text=strngrd1.Cells[0,c] then
  13. begin
  14. z:=1;
  15. x:=c;
  16. Form5.strngrd1.Cells[0,i]:=strngrd1.cells[0,c];
  17. r:=l-1;
  18. end;
  19. if edt1_search.Text<strngrd1.Cells[0,c] then
  20. r:=c-1;
  21. if edt1_search.Text>strngrd1.Cells[0,c] then
  22. l:=c+1;
  23. end;
  24. end;
  25. end;
  26. end;
Add Comment
Please, Sign In to add comment