es kann auch sein, dass es an Lazarus liegt
Delphi-Quellcode:
var
SourceChars: String;
resultString: String;
anzahl: Integer;
select: Integer;
i: Integer;
test: Integer;
begin
try
test:= StrToInt(repeat1.text);
except
exit;
end;
SourceChars := '';
if big.Checked then
SourceChars := SourceChars + gross;
if small.Checked then
SourceChars := SourceChars + klein;
If extra.Checked then
SourceChars := SourceChars + sonder;
If number.Checked then
SourceChars := SourceChars + zahlen;
if SourceChars = '' then begin
ShowMessage('Please select the wanted properties!');
exit;
end;
randomize;
resultString := '';
anzahl := StrToInt(repeat1.Text);
for i := 1 to anzahl do begin // !!!
select := random(length(SourceChars)) + 1;
resultString := resultString + SourceChars[select]; // besser als ständig in das Edit-Feld zu schreiben
end;
edit1.Text := resultString;