From Clomosy Docs

No edit summary
No edit summary
Line 29: Line 29:
<h2> See Also </h2>
<h2> See Also </h2>
* [[System_Library#Type_Conversion_Functions | Type Conversion Functions]]
* [[System_Library#Type_Conversion_Functions | Type Conversion Functions]]
{{#seo:|description=IntToHex converts an integer to a hexadecimal string, ensuring it is at least 'Digits' characters wide, with no prefix.}}

Revision as of 07:55, 24 December 2024

The IntToHex function converts a Value integer into a hexadecimal format sting of at least Digits characters wide.
The resulting string has no prefix character.

Example

var
  numberValue :Integer;
{
  numberValue = 8090;
  ShowMessage(IntToStr(numberValue)+' decimal = '+IntToHex(numberValue, 1));
 
  ShowMessage(IntToStr(numberValue)+' decimal = '+IntToHex(numberValue, 8));
}

Output:

DecHex.png

See Also