Registriert seit: 10. Jun 2003
Ort: Berlin
9.582 Beiträge
Delphi 11 Alexandria
|
Re: java to delphi
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 Alle eigenen Projekte sind eingestellt, ebenso meine Homepage, Downloadlinks usw. im Forum bleiben aktiv!
|