help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'System' (#rtl)

hexStr

Convert integer value to string with hexadecimal representation.

Declaration

Source position: line 0

function hexStr(

  Val: LongInt;

  cnt: Byte

):shortstring;

function hexStr(

  Val: Int64;

  cnt: Byte

):shortstring;

function hexStr(

  Val: Pointer

):shortstring;

Description

HexStr returns a string with the hexadecimal representation of Value. The string has exactly cnt charaters. (i.e. only the cnt rightmost nibbles are taken into account) To have a complete representation of a Longint-type value, 8 nibbles are needed, i.e. cnt=8.

Errors

None.

See also

Str

  

Convert a numerical value to a string.

Val

  

Calculate numerical value of a string.

BinStr

  

Convert integer to string with binary representation.

Example

Program example81;

{ Program to demonstrate the HexStr function }

Const Value = 45678;

Var I : longint;

begin
  For I:=1 to 10 do
    Writeln (HexStr(Value,I));
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505