* added HexStr(Pointer)

This commit is contained in:
peter 2005-02-25 12:34:46 +00:00
parent b1900cc269
commit 7eeca4fdce
2 changed files with 24 additions and 2 deletions

View File

@ -339,6 +339,21 @@ begin
end;
function hexstr(val : pointer) : shortstring;
var
i : longint;
v : ptrint;
begin
v:=ptrint(val);
hexstr[0]:=chr(sizeof(pointer)*2);
for i:=sizeof(pointer)*2 downto 1 do
begin
hexstr[i]:=hextbl[v and $f];
v:=v shr 4;
end;
end;
function space (b : byte): shortstring;
begin
space[0] := chr(b);
@ -865,7 +880,10 @@ end;
{
$Log$
Revision 1.33 2005-02-14 17:13:27 peter
Revision 1.34 2005-02-25 12:34:46 peter
* added HexStr(Pointer)
Revision 1.33 2005/02/14 17:13:27 peter
* truncate log
}

View File

@ -516,6 +516,7 @@ Function binStr(Val:Longint;cnt:byte):shortstring;
Function hexStr(Val:int64;cnt:byte):shortstring;
Function OctStr(Val:int64;cnt:byte):shortstring;
Function binStr(Val:int64;cnt:byte):shortstring;
Function hexStr(Val:Pointer):shortstring;
{ Char functions }
{$ifdef INTERNCONSTINTF}
@ -768,7 +769,10 @@ const
{
$Log$
Revision 1.120 2005-02-14 17:13:29 peter
Revision 1.121 2005-02-25 12:34:46 peter
* added HexStr(Pointer)
Revision 1.120 2005/02/14 17:13:29 peter
* truncate log
Revision 1.119 2005/02/08 20:25:28 florian