Dec2Hex
Back to ListDescription: Convert from Decimal to Hex value
FileMaker Prototype:
Set Variable [$res; ACF_Run("Dec2Hex"; long_dec; int_digits)]
Category: UTILITY
Function source:
function Dec2Hex (long dec, int digits)
if ( digits == 0 ) then // Free format
return format ( "%x", dec);
end if
return format ("%0" + digits + "x", dec); // Leading zero fixed format.
end
The Dec2Hex Function converts a numeric value to its Hex representation. If digits are 0, it gives as many hex digits as needed. If digits is non-zero, the result will be zero-padded
Example
Set Variable [$res; ACF_Run("Dec2Hex"; 300; 4)]
Gives the result "012c" 