(Gast)
n/a Beiträge
|
Re: Übersetzen in Delphi
13. Okt 2004, 19:37
Delphi-Quellcode:
uses {...}, Math;
{ ... }
var
Name: String;
NameLong, serial, serialTemp: LongWord;
CharTemp: Char;
var i: LongInt;
buffer: String[80];
begin
Name := NameEdit.Text;
NameLong := Length(Name);
serial := 0;
serialTemp := 0;
for i := 1 to NameLong do
begin
CharTemp := Name[i];
serial := serial + Round(Power(CharTemp, i));
end;
serialTemp := CharTemp * 6;
serial := serial shl 7;
serial := serial + serialTemp;
buffer := Format('%x', [serial]);
EditSerial.Text := buffer;
end;
Ohne Gewähr.
|
|
Zitat
|