Guest User

Untitled

a guest
Nov 25th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. i,k:integer;
  2. begin
  3. with form1.StringGrid1 do
  4. begin
  5. k:=1;
  6. for i:=1 to rowcount-1 do
  7. begin
  8. for j:=1 to rowcount-1 do
  9. begin
  10. if (cells[1,i]=cells[1,j]) and (cells[2,i]=cells[2,j]) and (cells[3,i]=cells[3,j]) then
  11. begin
  12. if k=2 then
  13. begin
  14. showmessage('');
  15. exit;
  16. end;
  17. if k=1 then k:=2;
  18. end;
  19. end;
  20. end;
  21. end;
  22. with form1.StringGrid2 do
  23. begin
  24. k:=1;
  25. for i:=1 to rowcount-1 do
  26. begin
  27. for j:=1 to rowcount-1 do
  28. begin
  29. if ((cells[1,i]=cells[1,j]) and (cells[2,i]=cells[2,j])) or ((cells[1,i]=cells[2,j]) and (cells[2,i]=cells[1,j])) then
  30. begin
  31. if k=2 then
  32. begin
  33. showmessage('');
  34. exit;
  35. end;
  36. if k=1 then k:=2;
  37. end;
  38. end;
  39. end;
  40. end;
Add Comment
Please, Sign In to add comment