没见过这样的函数,只好自己写了.
function Convert(numSrc,numCarry:Integer):string;
function GetNumChar(numSrc,numCarry:Integer):Char;
begin
if(numSrc<10)then
Result:=Chr(numSrc+Ord('0'))
else
Result:=Chr(numSrc-10+Ord('A'));
end;
var numResidue:Integer;
begin
if numSrc<10 then
begin
Result:=IntToStr(numSrc);
end
else
begin
Result:='';
numResidue:=numSrc mod numCarry;
while numResidue>0 do
begin
Result:=GetNumChar(numResidue,numCarry)+Result;
numSrc:=numSrc div numCarry;
numResidue:=numSrc mod numCarry;
end;
end;
end;
begin
Edit1.Text:=Convert(149999,36);//返回'37QN'
end;