Comando ===gt; Random
Tem como forçar um numero gerado pelo comando Random ter 16 digitos .. tipo
Random(9999999999999999);
Resultado := 1875634251895482
Random(9999999999999999);
Resultado := 1875634251895482
Marcelo Bh
Curtidas 0
Respostas
Motta
30/10/2003
tente isto , nao testei
procedure TForm1.Button1Click(Sender: TObject);
var
i:integer;
str: string;
max=16;
begin
str=´123456789´
Edit1.Text:=´´;
for i:=1 to max do
begin
Edit1.Text:=Edit1.Text+str[random(length(str))+1];
if I = 1 then
str := str + ´0´;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
i:integer;
str: string;
max=16;
begin
str=´123456789´
Edit1.Text:=´´;
for i:=1 to max do
begin
Edit1.Text:=Edit1.Text+str[random(length(str))+1];
if I = 1 then
str := str + ´0´;
end;
end;
GOSTEI 0