From Clomosy Docs
No edit summary |
ClomosyAdmin (talk | contribs) No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| 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:|title=IntToHex Using in Clomosy - Clomosy Docs}} | |||
{{#seo:|description=IntToHex converts an integer to a hexadecimal string, ensuring it is at least 'Digits' characters wide, with no prefix.}} | |||
Latest revision as of 13:58, 24 December 2024
function IntToHex(Value: Integer; Digits: Integer):string;
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:
8090 decimal = 1F9A
8090 decimal = 00001F9A
