Einzelnen Beitrag anzeigen

Daniel B
(Gast)

n/a Beiträge
 
#2

Re: Octal zu Integer und umgekehrt

  Alt 13. Jul 2003, 16:10
Hallo,

hier ist auch schon das Gegenstück dazu:
Delphi-Quellcode:
function IntToOct(iValue: LongInt): String;
var
  iRest: LongInt;
  sOct: String;
  iFor: Integer;
begin
  sOct := '';
  while iValue > 0 do
  begin
   iRest := iValue mod 8;
   iValue := iValue div 8;
   sOct := IntToStr(iRest) + sOct;
  end;
  Result := sOct;
end;
So aufrufen:
Delphi-Quellcode:
procedure TForm1.Button3Click(Sender: TObject);
begin
  ShowMessage(IntToOct(100));
end;
Grüsse, Daniel
  Mit Zitat antworten Zitat