MrSaint
Sr. Member
   
Offline
Beiträge: 472

|
 |
« am: 24.03.2002, 20:00:39 » |
|
Hi!
Ich wollte nur schnell nen Fehler in nem Tip bekannt geben.
Tip: [a href="http://www.swissdelphicenter.ch/de/showcode.php?id=443" target="_blank"]http://www.swissdelphicenter.ch/de/showcode.php?id=443[/a]
Fehler: Wenn man diese Fnkt. öfters anwendet, wird result immer länger.
Lsg.: einfach n och ein Result:='' einbauen. Also so:
[font size=2 face="Courier New"][font color="#000000"]function HexToBin(Hexadecimal: string): string; const BCD: array [0..15] of string = ('0000', '0001', '0010', '0011', '0100', '0101', '0110', '0111', '1000', '1001', '1010', '1011', '1100', '1101', '1110', '1111'); var i: integer; begin Result:=''; for i := Length(Hexadecimal) downto 1 do Result := BCD[StrToInt('$' + Hexadecimal)] + Result; end; [/font][/font]
MrSaint
|