Einzelnen Beitrag anzeigen

Benutzerbild von jaenicke
jaenicke

Registriert seit: 10. Jun 2003
Ort: Berlin
9.648 Beiträge
 
Delphi 11 Alexandria
 
#2

Re: java to delphi

  Alt 26. Feb 2009, 04:11
As you didn't tell what the code is for I couldn't test it. A direct translation should be:
Delphi-Quellcode:
function FlashG(fromINT, toINT: Integer): String;
var
  PPP, OOP: Integer;
begin
  Result := '';
  PPP := toINT;
  while PPP < fromInt do
    PPP := PPP * toINT;
  repeat
    OOP := fromInt div PPP;
    Result := Result + Chr(Ord('K') + OOP);
    fromInt := fromInt - PPP * OOP;
    PPP := PPP div toInt;
  until PPP <= 0;
end;
The naming conventions are different in Delphi but I didn't change it.
Sebastian Jänicke
AppCentral
  Mit Zitat antworten Zitat