-1
function Randomstring(strLen: Integer): string;
var
  ID: string;
begin
  ID := 'QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm1234567890';  
  Result := '';
  Repeat
    Result := Result + ID[Random(Length(ID)) + 1];
  until (Length(Result) = strLen)
end;

所有的分号对我来说似乎都很好。我错过了什么?

4

1 回答 1

0

您在语句末尾缺少分号until

until (Length(Result) = strLen); // <-- here
于 2019-02-05T02:23:41.347 回答