procedure mThread.Execute;
var
R1,R2,R3,R4,R5,R6:integer;
B1:integer;
Numbers:string;
Myfile:textfile;
const rn=33; bn=16;
begin
Allbate :=0;
assignfile(Myfile,'D:/caopiao.txt');
if not Fileexists('D:/caopiao.txt') then
rewrite(Myfile)
else
begin
DeleteFile('D:/caopiao.txt');
rewrite(Myfile);
end;
for R1:=1 to rn do
begin
for R2:=R1+1 to rn do
begin
for R3:=R2+1 to rn do
begin
for R4:=R3+1 to rn do
begin
for R5 := R4+1 to rn do
begin
for R6:=R5+1 to rn do
begin
for B1 :=1 to Bn do
begin
Numbers :=inttostr(R1) +',' +inttostr(R2) +','+inttostr(R3) +','+inttostr(R4);
Numbers :=
Numbers+ ','+
inttostr(R5)+','+inttostr(R6);
Numbers := Numbers +'|' + inttostr(B1);
Allbate:= Allbate + 1;
writeln(myfile,Numbers) ;
Synchronize(updateform);
end ;
end;
end;
end;
end
end;
end;
closefile(myfile);
end;
自己写在一个线程里面的
你慢慢看吧