C
channelxp
Unregistered / Unconfirmed
GUEST, unregistred user!
Multi := StrToInt(FUserPass) * StrToInt(RandomNum);
我运行的时候会报错说'3213123123' is not a valid integer value,单引号里的数字是由RandomNum随机生成的数字字符串,下面是产成随机数的代码
function TDModule.GetRandomNum: string;
var
i: Integer;
begin
Randomize;
RandomNum := '';
for i := 0 to 9 do
RandomNum := RandomNum + Char(Byte('0')+Byte(Random(10)));
Result := RandomNum;
end;
我运行的时候会报错说'3213123123' is not a valid integer value,单引号里的数字是由RandomNum随机生成的数字字符串,下面是产成随机数的代码
function TDModule.GetRandomNum: string;
var
i: Integer;
begin
Randomize;
RandomNum := '';
for i := 0 to 9 do
RandomNum := RandomNum + Char(Byte('0')+Byte(Random(10)));
Result := RandomNum;
end;