- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
function IntToHex(Num: Int64; Digits: Byte): String;
type
DataInt = Array[0..7] of Byte;
var
I:Byte;
Data: ^DataInt;
begin
Data := @Num;
Result := '';
for I := Trunc(Digits/2)-1 downto 0 do begin
if SizeOf(DataInt) < I then
Result := Result+'00'
else begin
case Data^[I] of
0: Result := Result+'00';
1: Result := Result+'01';
2: Result := Result+'02';
{ ........... }
253: Result := Result+'FD';
254: Result := Result+'FE';
255: Result := Result+'FF';
end;
end;
end;
end;
Follow us!