Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i,k:integer;
- begin
- with form1.StringGrid1 do
- begin
- k:=1;
- for i:=1 to rowcount-1 do
- begin
- for j:=1 to rowcount-1 do
- begin
- if (cells[1,i]=cells[1,j]) and (cells[2,i]=cells[2,j]) and (cells[3,i]=cells[3,j]) then
- begin
- if k=2 then
- begin
- showmessage('');
- exit;
- end;
- if k=1 then k:=2;
- end;
- end;
- end;
- end;
- with form1.StringGrid2 do
- begin
- k:=1;
- for i:=1 to rowcount-1 do
- begin
- for j:=1 to rowcount-1 do
- begin
- 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
- begin
- if k=2 then
- begin
- showmessage('');
- exit;
- end;
- if k=1 then k:=2;
- end;
- end;
- end;
- end;
Add Comment
Please, Sign In to add comment