Z zhangxuepu107 Unregistered / Unconfirmed GUEST, unregistred user! 2009-12-21 #1 我的程序要隔断时间生成一组十位的数字,前提是:每次生成的和已生成的不一样,本次生成的最好也不要重复.请问如何实现.可以用delphi实现,可以用sql server 实现.
D de410 Unregistered / Unconfirmed GUEST, unregistred user! 2009-12-21 #2 procedure TForm1.Button1Click(Sender: TObject); begin randomize; edit1.text:=inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9)); end;
procedure TForm1.Button1Click(Sender: TObject); begin randomize; edit1.text:=inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9))+inttostr(Random(9)); end;
F findwo Unregistered / Unconfirmed GUEST, unregistred user! 2009-12-22 #3 function getnumber(var l:integer):integer; begin l:=l+1; result:=1000000000+l; end; // l 上一个生成数,设置成全局变量
function getnumber(var l:integer):integer; begin l:=l+1; result:=1000000000+l; end; // l 上一个生成数,设置成全局变量